From b00693ce7399d5035d2e58ac8858e6010d319371 Mon Sep 17 00:00:00 2001 From: thfu <2779155576@qq.com> Date: Mon, 4 Nov 2024 19:09:41 +0800 Subject: [PATCH] choose the min length to compare --- script_m/diff_plot.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script_m/diff_plot.m b/script_m/diff_plot.m index e88b75a..19bf93a 100755 --- a/script_m/diff_plot.m +++ b/script_m/diff_plot.m @@ -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;