Hi,
what is the most efficient way of creating an upper triangular matrix?
Thanks
Pablo
1 Answer
1
accepted
If you are starting with an Nx1 vector you could use the xpnd and upmat functions like this:
d = { 1, 2, 3, 4, 5, 6 }; d_upper = upmat(xpnd(d));
d_upper =
1 2 4 0 3 5 0 0 6
Your Answer
1 Answer
1
accepted
If you are starting with an Nx1 vector you could use the xpnd and upmat functions like this:
d = { 1, 2, 3, 4, 5, 6 }; d_upper = upmat(xpnd(d));
d_upper =
1 2 4 0 3 5 0 0 6