How to make text conditional statements

6 visualizaciones (últimos 30 días)
Rachica Jean Baptiste
Rachica Jean Baptiste el 14 de Mayo de 2022
Respondida: ClementJ el 14 de Mayo de 2022
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

Respuestas (1)

ClementJ
ClementJ el 14 de Mayo de 2022
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

Categorías

Más información sobre Entering Commands en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by