nested IF-ELSE statement

1 visualización (últimos 30 días)
Ilmiat
Ilmiat el 14 de Sept. de 2020
Comentada: Image Analyst el 17 de Sept. de 2020
Please help me solving this matlab code. Thats how the answer should look like:-
  1 comentario
Cris LaPierre
Cris LaPierre el 14 de Sept. de 2020
It looks like you forgot to share your code.

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 14 de Sept. de 2020
Hint: input(), rem(), sprintf(), while
message = sprintf('>>>>> Enter an integer (0-9)\n blah blah fubar snafu lorem ipsum : ');
Change message passed to input depending on what their input was.
response = '0';
message = sprintf(.....
while response ~= 'x'
response = input(...........
if................
message = ...........
elseif ...........
end
end
See if you can finish it.
  5 comentarios
Ilmiat
Ilmiat el 17 de Sept. de 2020
Can you kindly just say what should I use for string and complex part? isstr, isreal are not working.
Image Analyst
Image Analyst el 17 de Sept. de 2020
elseif imag(p) ~= 0

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by