How to make text conditional statements
9 次查看(过去 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![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/997710/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/997710/image.png)
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!