To find the maximum value column index of a cell array

조회 수: 3 (최근 30일)
Shalmiya Paulraj SOC
Shalmiya Paulraj SOC 2022년 7월 9일
댓글: Shalmiya Paulraj SOC 2022년 7월 9일
I am having cell array (C) of 3072*2 cell, each containing matrix values of 5*1295 double. I need to find the maximum value column id (column index) of each 1295 column. How can I do that? Please help me with this. Thanks in advance.

채택된 답변

KSSV
KSSV 2022년 7월 9일
[m,n] = size(A) ;
val = cell(m,n) ;
id = cell(m,n) ;
for i = 1:m
for j = 1:n
[val{i,j},id{i,j}]=max(A{i,j}) ;
end
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by