Error in repeat for loop
1 ビュー (過去 30 日間)
表示 古いコメント
while
switch Vehicle Type
case{'compact','Compact'}
fprintf('1')
break
case{'midsize','Midsize'}
fprintf('2')
break
case{'truck','Truck'}
fprintf('3')
break
case{'industrial','Industrial'}
fprintf('4')
break
case{'military','Military'}
fprintf('4')
break
otherwise
fprintf('Vehicle type is not recognized. The program stops. Rerun the program again')
end
end
ive been trying to use the j nxm to get this loop to run five times
2 件のコメント
Sahil Jain
2021 年 11 月 18 日
Could you provide the following information?
- What is the termination condition for the "while" loop?
- What does "j nxm" refer to?
回答 (0 件)
参考
カテゴリ
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!