creating a matrix from a vector
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Kiyoko Christian Mwizu
il 8 Set 2020
Modificato: Bruno Luong
il 8 Set 2020
I have a vector v2=linspace(-30,10,100)
I want to create a matrix M1 that has three columns, each of which is v2 and another matrix M2 that has three rows, each of which is the transpose of v2. I am lost on how to solve this problem. Please help.
0 Commenti
Risposta accettata
Bruno Luong
il 8 Set 2020
Modificato: Bruno Luong
il 8 Set 2020
v2=linspace(-30,10,100) % This iis a ROW vector not column
M1 = [v2.', v2.', v2.']
M2 = [v2; v2; v2]
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Data Types in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!