How can I calculate fzero from values of matrices in cell array?
Ältere Kommentare anzeigen
Dear All, I have three cell arrays: cv_o, std_m and mean_m. Both cells contains 359 2D matrices. The size of matrices is same. I would like to calculate the root of an equation using the values of these matrices. I tried to calculate fzero by the following way:
for jj=1:359;
for i=1:464;
for j=1:201;
mat(i,j)=cv_o{jj};
mstd(i,j)=std_m{jj};
mmean(i,j)=mean_m{jj};
if mat(i,j) == 0;
b(i,j) = 0;
else
b(i,j)=fzero(@(x)mat(i,j)-(mstd(i,j)./mmean(i,j)).^x,(0));
end
end
end
end
But I got the following error message: Subscripted assignment dimension mismatch. Could someone write me how I should solve calculate the root?
Akzeptierte Antwort
Weitere Antworten (1)
Szabó-Takács Beáta
am 21 Apr. 2015
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!