Problem 43011. Convert a vector to a lower triangular matrix
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 commentsProblem Recent Solvers27
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
47435 Solvers
-
Extract leading non-zero digit
2050 Solvers
-
2187 Solvers
-
Back to basics 6 - Column Vector
1044 Solvers
-
Flip the main diagonal of a matrix
780 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!