input vector with input function

조회 수: 1 (최근 30일)
yuval ohayon
yuval ohayon 2018년 8월 11일
편집: Stephen23 2018년 8월 11일
hi,i need to do in my homework a vector with the input function how the syntax needs to be?i know only a number - x=input('input vector) x[1,9]=input('vector please') is not working.
  댓글 수: 1
Stephen23
Stephen23 2018년 8월 11일
편집: Stephen23 2018년 8월 11일
x[1,9] = ...
is not MATLAB syntax for anything. It looks like Python.
Note that input will create a vector, as long as the user writes their input as any valid MATLAB syntax that will generate a vector. So all you need is:
v = input(...);
Not that I would recommend doing this.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by