how do I create Matraix with same elements for several rows
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Stephan
2019 年 10 月 21 日
編集済み: Stephan
2019 年 10 月 21 日
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
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!