Adding each values to row vector
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Duckyoon Go
il 27 Mar 2021
Commentato: Star Strider
il 28 Mar 2021
Hi, I just started to study Matlab and quite confused by vectors.
I am trying to assign values to row vector
[a,b,c]=ones(1,3)
I thought 1 will be assigned to a,b, and c. but error occured saying too many output arguments.
Is there a function to assign multiple values to vector at once?
thanks
0 Commenti
Risposta accettata
Più risposte (1)
William
il 27 Mar 2021
... but if you just want to create a vector with three values, you would use a statement like:
a = [1,2,3];
This produces a vector with three elements:
a(1)=1, a(2)=2 and a(3)=3
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!