In the following code, I am getting a "Subscripted assignment dimension mismatch" in the SampEnMLAUC(i_files)= cumtrapz(sampEn_ML); line. When I used the trapz function on the same line previously, I did not get an error. however, when I used the cumtrapz function, I get the error. what am I missing in the function?
Thank you
N=length(copX); for t= 2:20 S=t; %S is scale factor
j= fix(N/S); for i=1:j copXscale(i)= mean(copX((i-1)*S+1:i*S)); copYscale(i)= mean(copY((i-1)*S+1:i*S)); end dim = 2; r = 0.4; RotatecopX=rot90(copXscale); RotatecopY=rot90(copYscale); sampEn_ML(t)=SampEn(dim,r,RotatecopX); sampEn_AP(t)=SampEn(dim,r,RotatecopY); end SampEnMLAUC(i_files)= cumtrapz(sampEn_ML); SampEnAPAUC(i_files)= cumtrapz(sampEn_AP);
Best Answer