Create a matrix with one vector
显示 更早的评论
Hey,
I want to create a matrix out of one vector.
v=[1,2,3,4]
And the matrix should have the form
M= 1 2 3 4
2 2 3 4
3 3 3 4
4 4 4 4
Is there an easy solution for that?
Thanks
采纳的回答
更多回答(1 个)
v = [1,2,3,4];
max(v, v.')
类别
在 帮助中心 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!