Adding a Foor Loop

6 vues (au cours des 30 derniers jours)
WhatIsMatlab-
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.

Réponse acceptée

Star Strider
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.

Plus de réponses (0)

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!

Translated by