Second problem uitable
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Walter Roberson
2011 年 11 月 2 日
iszero = cellfun(@(p) isequal(p,0),b);
Now you can find(iszero) or find(~iszero) or use b(~iszero)
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!