take input in array
조회 수: 8 (최근 30일)
이전 댓글 표시
if i want user to to input n number of values in the input window in array form how should i do it
댓글 수: 0
채택된 답변
Ameer Hamza
2020년 10월 9일
vec = input('Enter an array: ')
run the above line and type
[1,2,3,4]
in the command window. You will get
>> vec
vec =
1 2 3 4
댓글 수: 2
Ameer Hamza
2020년 10월 9일
You can use the UI Editfield: https://www.mathworks.com/help/releases/R2020b/matlab/ref/uieditfield.html.
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!