Adding a Foor Loop

5 次查看(过去 30 天)
know I need to use a for loop but I cannot seem to get it to run.

采纳的回答

Star Strider
Star Strider 2016-2-20
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 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by