Info

此问题已关闭。 请重新打开它进行编辑或回答。

From for loop, how save results as a diagonal matrix

1 次查看(过去 30 天)
For loop, every time results 24 * 3 elements, next loop another 24 *3 elements. I want save all the results elements of the complete loop as a diagonal matrix upper and lower are zeros. How can I do that
  2 个评论
Walter Roberson
Walter Roberson 2020-5-20
24*3 is more than 12 full columns of a diagonal matrix and less than 13.
1 2 4 7
3 5 8
6 9
10
and so on. Now when you start filling in the second such matrix for the second iteration of the loop should it continue from where the previous one left off in mid column, or should it start at the top of the next column?
A diagram of what you want would help.

回答(0 个)

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by