how do I create Matraix with same elements for several rows
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
venkat siddhartha rama
il 21 Ott 2019
Commentato: Stephan
il 21 Ott 2019
I have No of turbines = [25,35,45,55,65];
I want No_of_turbines=25 35 45 55 65
25 35 45 55 65
25 35 45 55 65
'' '' '' '' ''
and so on...
In essence, I have to copy the row vector several times into columns...please help
Thanks in advance
0 Commenti
Risposta accettata
Stephan
il 21 Ott 2019
Modificato: Stephan
il 21 Ott 2019
turbines = [25,35,45,55,65];
how_often = 10;
No_of_turbines = repmat(turbines,how_often,1)
to get it ten times:
No_of_turbines =
25 35 45 55 65
25 35 45 55 65
25 35 45 55 65
25 35 45 55 65
25 35 45 55 65
25 35 45 55 65
25 35 45 55 65
25 35 45 55 65
25 35 45 55 65
25 35 45 55 65
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!