Why won't this equality work?
1 回表示 (過去 30 日間)
古いコメントを表示
I got my top 17 values and I need to obtain a set corresponding values with it. I tried to use a code I used beforehand but it was comparing a single value, not a matrix where I think my problem resides. When ran it goes through obtainining none of the secondary values (Ts).
wh17=maxk(w(:,3),17);
Hs=mean(wh17);
for i=1:50
if w(i,3)==wh17(:)
Ts=w(i,2)
end
end
0 件のコメント
採用された回答
David Hill
2022 年 10 月 10 日
wh17=maxk(w(:,3),17);
Hs=mean(wh17);
Ts=w(ismember(w(:,3),wh17),2);
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!