Filter löschen
Filter löschen

nested IF-ELSE statement

3 Ansichten (letzte 30 Tage)
Ilmiat
Ilmiat am 14 Sep. 2020
Kommentiert: Image Analyst am 17 Sep. 2020
Please help me solving this matlab code. Thats how the answer should look like:-
  1 Kommentar
Cris LaPierre
Cris LaPierre am 14 Sep. 2020
It looks like you forgot to share your code.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 14 Sep. 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 Kommentare
Ilmiat
Ilmiat am 17 Sep. 2020
Can you kindly just say what should I use for string and complex part? isstr, isreal are not working.
Image Analyst
Image Analyst am 17 Sep. 2020
elseif imag(p) ~= 0

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by