Filter löschen
Filter löschen

add column to a matriz

1 Ansicht (letzte 30 Tage)
Valerie Cala
Valerie Cala am 12 Nov. 2018
Bearbeitet: madhan ravi am 13 Nov. 2018
Hey Guys!
Today I want to do the following:
I count with a random matriz named wp:
wp=rand(3);
wp =
0.1190 0.3404 0.7513
0.4984 0.5853 0.2551
0.9597 0.2238 0.5060
And a column full of -1 named u:
u= (ones(3,1));
u=-1
-1
-1
Now, the thing I want to do is add the column "u" to the matrix as shone below:
-1 0.1190 0.3404 0.7513
-1 0.4984 0.5853 0.2551
-1 0.9597 0.2238 0.5060
Thanks for your time :)

Akzeptierte Antwort

madhan ravi
madhan ravi am 13 Nov. 2018
newmatrix=[u wp]
  2 Kommentare
Valerie Cala
Valerie Cala am 13 Nov. 2018
Thanks, really appreciate it :)
madhan ravi
madhan ravi am 13 Nov. 2018
Bearbeitet: madhan ravi am 13 Nov. 2018
Anytime :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by