Second problem uitable
1 view (last 30 days)
Show older comments
i have another problem similarly with before:
m=3; d=5; b=num2cell(zeros(m,d)); b{1,1} = rand; b{1,6} = rand; b{2,7} = rand;
how can I save the 0 filled cells and random number filled cells differently?
0 Comments
Accepted Answer
Walter Roberson
on 2 Nov 2011
iszero = cellfun(@(p) isequal(p,0),b);
Now you can find(iszero) or find(~iszero) or use b(~iszero)
More Answers (1)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!