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

採用された回答

A. Sawas
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 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by