I now have a row vector and I want to convert it to a lower trilangular matrix.
The rows of the lower trilangular matrix have the corresponding elements of the vector.
For example:
input = 1:16
output = [
1 0 0 0 0 0
2 3 0 0 0 0
4 5 6 0 0 0
7 8 9 10 0 0
11 12 13 14 15 0
16 0 0 0 0 0]
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers33
Suggested Problems
-
Return the largest number that is adjacent to a zero
5549 Solvers
-
Replace NaNs with the number that appears to its left in the row.
3073 Solvers
-
476 Solvers
-
Make a random, non-repeating vector.
11841 Solvers
-
Return the first and last characters of a character array
12473 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!