Effacer les filtres
Effacer les filtres

can i write simple for loop in the command window

60 vues (au cours des 30 derniers jours)
Andrew Kreitzman
Andrew Kreitzman le 1 Août 2013
Have some output data and I need to organize it. simple for loop will do but can i write it in the command window?

Réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 1 Août 2013
Modifié(e) : Azzi Abdelmalek le 1 Août 2013
for k=1:3;a(k)=k^2;end
%or
for k=1:3,...
a(k)=k^2,...
end
  1 commentaire
Andrew Kreitzman
Andrew Kreitzman le 1 Août 2013
ohhhh i wasn't adding the colon after the for. thanks!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by