bug in IEEEP370Zc2xThru.m
Dear Mr. Ellison,
In you code IEEEP370Zc2xThru.m
line 171
s_2xthru = interpolate_sparameters(s_2xthru,fnew);
will result in an error because fnew
is unspecified if only flag_DC
is true but flag_DF
is false.
I propose to replace with this code:
% if the frequency vector needed to change, adjust the 2x-thru
if or(flag_DC,flag_DF)
if exist('fnew')
s_2xthru = interpolate_sparameters(s_2xthru,fnew);
else
s_2xthru = interpolate_sparameters(s_2xthru,f);
end
end
Best, Herbert