choose the min length to compare

This commit is contained in:
thfu 2024-11-04 19:09:41 +08:00
parent 2fdaaa3611
commit b00693ce73
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
function diff_plot(iir_out, Script_out,leg1,leg2,a)
N = length(iir_out);
N = min(length(iir_out),length(Script_out));
iir_out = iir_out(1:N);
Script_out = Script_out(1:N);
n = 0:1:N-1;
diff = iir_out-Script_out;