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

0 votos

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 15 de Sept. de 2020
What is 'x' here?
Image Analyst
Image Analyst el 15 de Sept. de 2020
Did you see your prompt? It says "To exit the program, enter x". So when input() captures the character(s) the user types, we need to check if that character is x or not, right? At least that's how I read it. So, anyway, what do you have so far?
Ilmiat
Ilmiat el 17 de Sept. de 2020
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 App Building en Centro de ayuda y File Exchange.

Preguntada:

el 14 de Sept. de 2020

Comentada:

el 17 de Sept. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by