How to avoid UniformOutput in cellfun/arrayfun when not needed
4 ビュー (過去 30 日間)
古いコメントを表示
Hi, I noticed that sometimes cellfun and arrayfun require to set the flag UniformOutput to false even when the results could be easily stored in a matrix, as in the UniformOutput = true case.
I suppose that this happens when I do not call a matlab built-in function (for example a mex function) and the result could potentially be non-uniform. Is there a way to tell matlab to try with UniformOutput = true anyway? I'm spending a lot of unnecessary time converting back the results with cell2mat.
Thanks.
1 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!