Adding a Foor Loop
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
WhatIsMatlab-
le 20 Fév 2016
Modifié(e) : WhatIsMatlab-
le 23 Fév 2016
know I need to use a for loop but I cannot seem to get it to run.
0 commentaires
Réponse acceptée
Star Strider
le 20 Fév 2016
One problem was this line in your second while loop:
d(end+1,1:1) = n;
changing it to:
d(end+1,:) = n;
allows your code to run. I will let you decide if your code produces the correct results.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!