creating a matrix from vectors

1 Ansicht (letzte 30 Tage)
Aleksandra Ksiezyk
Aleksandra Ksiezyk am 28 Aug. 2020
Beantwortet: Alan Stevens am 28 Aug. 2020
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.. ?

Akzeptierte Antwort

Alan Stevens
Alan Stevens am 28 Aug. 2020
Here's one way:
Ta_new = Ta;
for i = 1:30
Ta_new = [Ta_new Ta+i*k];
end

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by