To find the maximum value in each column of a cell array.
조회 수: 2 (최근 30일)
이전 댓글 표시
채택된 답변
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!