How to apply at each cell a division
1 次查看(过去 30 天)
显示 更早的评论
Hi, I've a 1500x1500 double cells, I want to apply a division for a number took it from a 4000x1 double cells, and do it in a for cycle.
I wrote a code that open my files from a directory, but I know that I have to use cellfun comand to do that.
Thanks in advance
Stefano
5 个评论
dpb
2016-2-15
Still, 1500 X 1500 ~= 4000??? (Actually, of course, 1500^2 is much, much larger than 4000.)
As for the element-wise division, for the first N elements of the first it's possible...
M=matrix1.'; % reorient to column major
M4K=M(1:4000); % save first 4K points
matrix2=M4K./matrix2; % do division as illustrated by example
But, still how to treat the 2.246 million other values from the original 2.25M-element 1500-square array would be a mystery.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!