Effacer les filtres
Effacer les filtres

input vector with input function

3 vues (au cours des 30 derniers jours)
yuval ohayon
yuval ohayon le 11 Août 2018
Modifié(e) : Stephen23 le 11 Août 2018
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 commentaire
Stephen23
Stephen23 le 11 Août 2018
Modifié(e) : Stephen23 le 11 Août 2018
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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by