CHnages from silas PC
This commit is contained in:
@@ -344,14 +344,14 @@ classdef Signal
|
||||
|
||||
% spectrum_plot(obj.signal,options.fsamp,options.figurename,options.displayname);
|
||||
|
||||
N = 2^(nextpow2(length(obj.signal))-10);
|
||||
N = 2^(nextpow2(length(obj.signal))-2);
|
||||
|
||||
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');
|
||||
% p_lin = smooth(p_lin,0.05,'rloess');
|
||||
end
|
||||
|
||||
|
||||
@@ -376,10 +376,10 @@ classdef Signal
|
||||
|
||||
if options.normalizeToNyquist==0
|
||||
xlabel("Frequency in GHz");
|
||||
%xlim([-obj.fs/2 obj.fs/2].*1e-9)
|
||||
% xlim([-obj.fs/2 obj.fs/2].*1e-9)
|
||||
edgetick = 2^(nextpow2(obj.fs*1e-9));
|
||||
xticks([-edgetick:16:edgetick]);
|
||||
xlim([100*round( min(w.*1e-9)/100,1)-10,100*round( max(w.*1e-9)/100,1)+10])
|
||||
xlim([100*round( min(w)/100,1)-10,100*round( max(w)/100,1)+10])
|
||||
else
|
||||
xlabel("Normalized Frequency");
|
||||
xlim([-pi, pi]);
|
||||
|
||||
Reference in New Issue
Block a user