windows 10 matlab interactive input needs condensing on output. How to do?

My code is:
prompt='a='; a=input(prompt)
prompt='b='; b=input(prompt)
prompt='c='; c=input(prompt)
prompt='d='; d=input(prompt)
Output is:
a=-3
a =
-3
b=0
b =
0
Desired output:
a=-3
b=0
c=0
d=2
Can I do this?
MM

답변 (1개)

This did not work at first but after a second restart I got the output I wanted.
INPUT:
prompt='a='; a=input(prompt);
prompt='b='; b=input(prompt);
prompt='c='; c=input(prompt);
prompt='d='; d=input(prompt);
OUTPUT:
a=-3
b=0
c=0
d=2
CASE CLOSED ...

카테고리

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

질문:

2019년 1월 16일

답변:

2019년 1월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by