필터 지우기
필터 지우기

save index of find- loop in a table

조회 수: 1 (최근 30일)
Frederik Reese
Frederik Reese 2022년 5월 24일
댓글: Frederik Reese 2022년 5월 24일
Hi,
I have a table and im looking for values of each row with find.
In the next step I want to save the column number (index) of the searched objekt in a table for each row.
Thanks
for i=1:143
[row,col]=find(HQ10000_WH(i,[1:10498])>0,1,'first')
end

채택된 답변

KSSV
KSSV 2022년 5월 24일
편집: KSSV 2022년 5월 24일
C = cell(143,1) ;
for i=1:143
[row,col]=find(HQ10000_WH(i,[1:10498])>0,1,'first')
C{i} = col ;
end
  댓글 수: 4
Frederik Reese
Frederik Reese 2022년 5월 24일
thanks
Frederik Reese
Frederik Reese 2022년 5월 24일
how do i get the cell back to a double, with replacing the [] rows with 0 or NaN?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by