フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Need to compare one value to an array that has 1000 decimal values

1 回表示 (過去 30 日間)
Vishan Gupta
Vishan Gupta 2018 年 9 月 29 日
閉鎖済み: Stephen23 2018 年 9 月 29 日
I have a=0.3, I have a vector jki=0:0.00065:0.65 (its a 1x1001 vector). I want to compare each value of jki to a, if that is true, display something. I've tried searching online but don't really understand still how to do it. This is what my guess would be for the code, but it doesn't work:
for k=1:size(jki)
if jki(k)==a
disp('something');
end
end

回答 (0 件)

この質問は閉じられています。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by