I have 28*6 cell as seen in the picture. Except for the first column, I need all the other columns to have equal lengths by filling them up with zeros in the end. Thanks in advance.
1 回表示 (過去 30 日間)
古いコメントを表示
![data.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/212798/data.png)
0 件のコメント
採用された回答
A. Sawas
2019 年 4 月 9 日
% ca is your cellarray
ii = cellfun(@isnumeric, ca);
m = max(cellfun(@numel, ca(ii)));
ca(ii) = cellfun(@(x)[x;zeros(m-numel(x),1)], ca(ii), 'UniformOutput', 0);
0 件のコメント
その他の回答 (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!