To find the maximum value in each column of a cell array.
3 ビュー (過去 30 日間)
古いコメントを表示
I am having cell array of 3072*2 cell, each containing matrix values of 5*1295 double. I need to find the maximum value of each 1295 column. How can I do that? Please help me with this. Thanks in advance.
0 件のコメント
採用された回答
KSSV
2022 年 7 月 7 日
Let A be your cell array of size 3072*2 where each cell has a matrix of size 5x1295.
[m,n] = size(A) ;
iwant = cell(m,n) ;
for i = 1:m
for j = 1:n
iwant{i,j}=max(A{i,j}) ;
end
end
その他の回答 (1 件)
Pratyush Swain
2022 年 7 月 7 日
hi,
I hope this will help,
C = {[1 2;10 11] [2 3;4 5]; [3 4;9 10] [4 5;2 3];[2 3;2 3] [5 6;3 4]}
[r,c]=size(C);
for i=1:r
for j=1:c
max(C{i,j})
end
end
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!