필터 지우기
필터 지우기

subscript for loop finding max value index

조회 수: 2 (최근 30일)
shobhit mehrotra
shobhit mehrotra 2015년 2월 10일
댓글: Star Strider 2015년 2월 10일
Hi Im trying to use a find function on the for loop, but Im getting an error that. In an assignment A(I) = B, the number of elements in B and I must be the same. This is the line im trying to fix. I need to add (n) to right side of the equation, but I don't know where to place it.
for n=1:13
indm(n) = (find(longm == max(longm((dataind{n})))))
end
dataind is an array of indices used in a calculation
Ultimately what Im trying to do is to find the indices of the maximum values of a vector length (1x30000) in a for loop, i should get a result of a vector of length 1x13
Thanks

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by