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