Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

more for loop help

3 vues (au cours des 30 derniers jours)
James
James le 7 Août 2011
Clôturé : MATLAB Answer Bot le 20 Août 2021
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

Réponses (2)

bym
bym le 7 Août 2011
for k = 11:3:20
%do stuff
end

Walter Roberson
Walter Roberson le 7 Août 2011
Or you could use
for k = [11,14,17,20]
%do stuff
end

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by