Please help me solving this matlab code. Thats how the answer should look like:-

댓글 수: 1

Cris LaPierre
Cris LaPierre 2020년 9월 14일
It looks like you forgot to share your code.

댓글을 달려면 로그인하십시오.

 채택된 답변

Image Analyst
Image Analyst 2020년 9월 14일

0 개 추천

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

Ilmiat
Ilmiat 2020년 9월 15일
What is 'x' here?
Image Analyst
Image Analyst 2020년 9월 15일
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 2020년 9월 17일
Ilmiat
Ilmiat 2020년 9월 17일
Can you kindly just say what should I use for string and complex part? isstr, isreal are not working.
elseif imag(p) ~= 0

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 App Building에 대해 자세히 알아보기

질문:

2020년 9월 14일

댓글:

2020년 9월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by