From cc93b149579a414131df1ff8cde74b166ac14c35 Mon Sep 17 00:00:00 2001 From: MarcoRianiUNIPR Date: Mon, 19 Jun 2023 15:06:46 +0200 Subject: [PATCH] Improved checking of out.Un If field Un in input structure is present it is not deleted --- graphics/resfwdplot.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/graphics/resfwdplot.m b/graphics/resfwdplot.m index 62246b74b..519ac4242 100644 --- a/graphics/resfwdplot.m +++ b/graphics/resfwdplot.m @@ -1128,15 +1128,18 @@ if any(strcmp(fieldnames(out),'class')) if strcmp(out.class,'MMregeda') x=out.eff; - out.Un=''; + % out.Un=''; elseif strcmp(out.class,'Sregeda') x=out.bdp; - out.Un=''; + % out.Un=''; elseif strcmp(out.class,'MDPDReda') x=out.bdp; + % out.Un=''; + end + % If field Un does not exist then it is initialized with empty + if ~isfield(out,'Un') out.Un=''; end - end plot1=plot(x,residuals,'tag','data_res','LineWidth',standard.LineWidth);