How can I change the 1_D array to the 2_D in specific case?
Show older comments
Hello everyone pleas How can I rewrite the 1_D array(X) into 2_D array(New_X)?
For example:
X=[0 1 0 2 3 0 4 5 6 0 7 8 9 10 0];
into
New_X(i,j)=[0 1 2 4 7
1 0 3 5 8
2 3 0 6 9
4 5 6 0 10
7 8 9 10 0];
1 Comment
Walter Roberson
on 2 Jun 2021
What is the logic for skipping values?
Accepted Answer
More Answers (0)
Categories
Find more on Sparse Matrices 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!