save index of find- loop in a table

4 ビュー (過去 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 Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by