take input in array

84 views (last 30 days)
Tejas Mahajan
Tejas Mahajan on 9 Oct 2020
Commented: Ameer Hamza on 9 Oct 2020
if i want user to to input n number of values in the input window in array form how should i do it

Accepted Answer

Ameer Hamza
Ameer Hamza on 9 Oct 2020
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

More Answers (1)

madhan ravi
madhan ravi on 9 Oct 2020
Use input() , enter the values in the form [1,5,4] an example.
doc input
  1 Comment
Tejas Mahajan
Tejas Mahajan on 9 Oct 2020
i want to do this in Matlab App Designer.

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by