Mainly AWG updates
This commit is contained in:
@@ -249,8 +249,12 @@ classdef Filter < handle
|
||||
end
|
||||
|
||||
function showHere(obj)
|
||||
obj.signal_length = 512;
|
||||
[H_,~] = obj.buildFilter();
|
||||
if isempty(obj.H)
|
||||
obj.signal_length = 4096;
|
||||
[H_,~] = obj.buildFilter();
|
||||
else
|
||||
H_ = obj.H;
|
||||
end
|
||||
fs = obj.fs;
|
||||
frex = linspace(-fs/2,fs/2,numel(H_)).*1e-9;
|
||||
|
||||
@@ -265,6 +269,12 @@ classdef Filter < handle
|
||||
[~, index] = min(abs(filt - (-3)));
|
||||
threedB = frex(index);
|
||||
|
||||
[~, index] = min(abs(filt - (-6)));
|
||||
sixdB = frex(index);
|
||||
|
||||
[~, index] = min(abs(filt - (-10)));
|
||||
ninedB = frex(index);
|
||||
|
||||
cur_module_name = '';
|
||||
|
||||
filter_desc = char([num2str(obj.filtdegree),'th-order ',char(obj.filterType),'; f cut:',num2str(fc.*1e-9),' GHz']);
|
||||
@@ -273,10 +283,17 @@ classdef Filter < handle
|
||||
legend Interpreter none
|
||||
title('Magnitude')
|
||||
hold on
|
||||
p = plot(frex,filt,'LineWidth',1,'LineStyle','-','DisplayName',[cur_module_name,': ',filter_desc]);
|
||||
p = plot(frex,filt,'LineWidth',1,'LineStyle','-','DisplayName',[cur_module_name,': ',filter_desc, '; 3/6/10 dB: ', num2str(threedB),'/ ',num2str(sixdB),'/ ',num2str(ninedB)]);
|
||||
|
||||
xline([-threedB,threedB],'LineStyle','-','LineWidth',1,'HandleVisibility','off','Color',p.Color);
|
||||
xline([-sixdB,sixdB],'LineStyle','-','LineWidth',1,'HandleVisibility','off','Color',p.Color);
|
||||
xline([-ninedB,ninedB],'LineStyle','-','LineWidth',1,'HandleVisibility','off','Color',p.Color);
|
||||
|
||||
xline(fcut_,'LineStyle',':','LineWidth',1,'HandleVisibility','off','Color',p.Color);
|
||||
yline(-3,'LineStyle',':','LineWidth',1,'HandleVisibility','off');
|
||||
yline([-3, -6, -9],'LineStyle',':','LineWidth',1,'HandleVisibility','off');
|
||||
|
||||
xlim([0 fc.*2].*1e-9);
|
||||
ylim([ninedB-6, 2]);
|
||||
legend
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user