Adding a Foor Loop

조회 수: 4 (최근 30일)
WhatIsMatlab-
WhatIsMatlab- 2016년 2월 20일
편집: WhatIsMatlab- 2016년 2월 23일
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