creating a matrix from vectors

1 回表示 (過去 30 日間)
Aleksandra Ksiezyk
Aleksandra Ksiezyk 2020 年 8 月 28 日
回答済み: Alan Stevens 2020 年 8 月 28 日
hallo, i have a vector Ta [12x1] and k[12x1] how could i create a matrix Ta_new [12,31] that the first column is Ta, the second column is Ta+k, the third column would be Ta+2k and so on.. ?

採用された回答

Alan Stevens
Alan Stevens 2020 年 8 月 28 日
Here's one way:
Ta_new = Ta;
for i = 1:30
Ta_new = [Ta_new Ta+i*k];
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by