How to make text conditional statements
6 ビュー (過去 30 日間)
古いコメントを表示
complete total beginner here, but im trying to write a script that tells u how many bones in a limb but need help writing the seond line

0 件のコメント
回答 (1 件)
ClementJ
2022 年 5 月 14 日
Hi,
Maybe use '\n' in your line 2:
prompt = 'Enter Bady Part : \n';
g = input(prompt,'s');
if g == 'hand'
disp('27')
elseif g == 'finger'
disp('3')
end
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!