Making Matrix Dimensions Equal
1 回表示 (過去 30 日間)
古いコメントを表示
Hey,
I have this cell with 12 different matrix. They are all of different size in length. How can I make all of them equal to 501 x 53 in size.
5 件のコメント
採用された回答
Guillaume
2019 年 10 月 28 日
smallestwidth = min(cellfun('size', yourcellarray, 2)); %smallest width of all matrices in the cell array
newcellarray = cellfun(@(m) m(:, 1:smallestwidth), yourcellarray, 'UniformOutput', false); %crop all matrices inside the cell array to the smallest width
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!