how to create a matrix from a vector in this style
1 view (last 30 days)
Show older comments
So I have a vector e.g
P = [0.9 0.8] 1x2 vector
My outcome has to become Q =
0.9000 0.8000 0 0 0
0 0.9000 0.8000 0 0
0 0 0.9000 0.8000 0
0 0 0 0.9000 0.8000
So basically the row represent a year forecast, and the number is a pattern that has to be applied.
so i have a bit difficulty transforming this P vector into such a format. i.e that whenever the vector is moved one column that it has to add a zero column or something. I am trying to do this without for loops obviously.
best
0 Comments
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!