stuff from 400G analysis (project deliv 01)
This commit is contained in:
@@ -67,22 +67,29 @@ classdef Postfilter < handle
|
||||
|
||||
end
|
||||
|
||||
function showFilter(obj,noiseclass_in,options)
|
||||
function showFilter(obj,options)
|
||||
|
||||
arguments
|
||||
obj
|
||||
noiseclass_in
|
||||
options.noiseclass_in =[]
|
||||
options.fignum = 121
|
||||
options.color = []
|
||||
end
|
||||
|
||||
% noiseclass_in.spectrum('displayname','Noise PSD shifted to 0dBm','fignum',options.fignum,'normalizeTo0dB',1);
|
||||
|
||||
if ~isempty(options.noiseclass_in)
|
||||
len = length(options.noiseclass_in);
|
||||
fs = options.noiseclass_in.fs;
|
||||
else
|
||||
len = 1024;
|
||||
fs = 1;
|
||||
end
|
||||
|
||||
figure(options.fignum)
|
||||
[h,w] = freqz(1,obj.coefficients,length(noiseclass_in),"whole",noiseclass_in.fs);
|
||||
[h,w] = freqz(1,obj.coefficients,len,"whole",fs);
|
||||
h = h/max(abs(h));
|
||||
hold on
|
||||
w_ = (w - noiseclass_in.fs/2);
|
||||
w_ = (w - fs/2);
|
||||
|
||||
if isempty(options.color)
|
||||
plot(w_.*1e-9,20*log10(fftshift(abs(h))),'DisplayName',['Burg Coeffs: ', num2str(round(obj.coefficients,2)), ' '],'LineWidth',2);
|
||||
|
||||
Reference in New Issue
Block a user