This commit is contained in:
Silas Labor Zizou
2024-10-23 09:32:22 +02:00
5 changed files with 216 additions and 72 deletions

View File

@@ -344,13 +344,14 @@ classdef Signal
% spectrum_plot(obj.signal,options.fsamp,options.figurename,options.displayname);
N = 2^(nextpow2(length(obj.signal))-8);
N = 2^(nextpow2(length(obj.signal))-10);
if options.normalizeToNyquist==0
[p_lin,w] = pwelch(obj.signal,hanning(N),N/2,N,obj.fs,"centered","power","mean");
w=w.*1e-9;
else
[p_lin,w] = pwelch(obj.signal,hanning(N),N/2,N,"centered","power","mean");
p_lin = smooth(p_lin,0.05,'rloess');
end