take input in array

조회 수: 8 (최근 30일)
Tejas Mahajan
Tejas Mahajan 2020년 10월 9일
댓글: Ameer Hamza 2020년 10월 9일
if i want user to to input n number of values in the input window in array form how should i do it

채택된 답변

Ameer Hamza
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
Tejas Mahajan
Tejas Mahajan 2020년 10월 9일
I want to do this in MAtlab App Designer
Ameer Hamza
Ameer Hamza 2020년 10월 9일

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

madhan ravi
madhan ravi 2020년 10월 9일
Use input() , enter the values in the form [1,5,4] an example.
doc input
  댓글 수: 1
Tejas Mahajan
Tejas Mahajan 2020년 10월 9일
i want to do this in Matlab App Designer.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by