% It generates the residual signals plots close all th = 0.1; % tolerance of +/-10% w.r.t. % min and max values of the residual maxr1 = max(r1(find(r1(:,1)