How do i get multiple inputs from keyboard and store them in an array
이전 댓글 표시
How do i get multiple inputs from keyboard and store them in an array
% code
valstring = input('enter the number of points ', 's');
valparts = regexp(valstring, '[ ,]', 'split');
values = str2double(valparts);
I want to store them as an array to plot a graph.
댓글 수: 1
Walter Roberson
2014년 2월 23일
What you are doing should work, resulting in "values" being a vector.
답변 (1개)
Dishant Arora
2014년 2월 23일
array = input('Enter elements of array'); %%Enclose the input in square braces when matlab asks
%%for it
카테고리
도움말 센터 및 File Exchange에서 Desktop에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!