How to create this specified matrix?
显示 更早的评论
Hi all. I have some values from U(1)...to...U(500) , and I need help to create this matrix:

采纳的回答
更多回答(2 个)
Azzi Abdelmalek
2016-5-21
u=1:10
n=numel(u)
v=repmat(u',1,n)
w=cell2mat(arrayfun(@(x) circshift(v(:,x),[x-1 0]),1:n,'un',0) )
out=tril(w)
Andrei Bobrov
2016-5-21
tril(toeplitz(u))
类别
在 帮助中心 和 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!