How to make text conditional statements

조회 수: 1 (최근 30일)
Rachica Jean Baptiste
Rachica Jean Baptiste 2022년 5월 14일
답변: ClementJ 2022년 5월 14일
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

답변 (1개)

ClementJ
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

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by