How do i implement interactive input of multiple variables?
조회 수: 6 (최근 30일)
이전 댓글 표시
I need to run a program which is plotting fluid streamlines. I have the program working except the user input from the command line.
What i want is for the program to ask "What are the w x y z details of the streamline?", where w x y and z represent 4 different variables, and have them read into the program.
I was trying this using the 'input' command but can only do it with one number at a time.
I thought this may work for multiple variables but it didn't:
[x_init, y_init, h, tmax]=input('Enter details of 1st streamline (x_init, y_init, step size, run time:');
x_init, y_init, h, tmax are the variables i wish to input from the command line and be used in the program.
댓글 수: 0
답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!