Just wondering how I should go about storing all of the values that I get out of this loop in 'idx' without overriding the previous itteration.
idx = []
for i = length (grfcutl)
a = grfcutl{i}
b = find(a<=0)
idx = b(1)
end
Thanks!

 採用された回答

Serhii Tetora
Serhii Tetora 2020 年 9 月 3 日

0 投票

idx = [];
for i = 1:length(grfcutl)
a = grfcutl{i};
idx(end+1) = find(a<=0,1,'first')
end

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

質問済み:

2020 年 9 月 3 日

回答済み:

2020 年 9 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by