How to create this specified matrix?
2 次查看(过去 30 天)
显示 更早的评论
采纳的回答
更多回答(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)
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!