フィルターのクリア

Info

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

more for loop help

3 ビュー (過去 30 日間)
James
James 2011 年 8 月 7 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
for c = 11:20
if c~=11 && c~=14 && c~=17 && c~=20
break
end
% how can I loop through for all values of r, which are r=11,14,17,20????
end

回答 (2 件)

bym
bym 2011 年 8 月 7 日
for k = 11:3:20
%do stuff
end

Walter Roberson
Walter Roberson 2011 年 8 月 7 日
Or you could use
for k = [11,14,17,20]
%do stuff
end

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by