How can I calculate fzero from values of matrices in cell array?
Show older comments
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?
Accepted Answer
More Answers (1)
Szabó-Takács Beáta
on 21 Apr 2015
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!