If I have an upper triangular matrix on MATLAB LIKE
A =
1 2 3 4
0 5 6 7
0 0 8 9
0 0 0 1
How would you convert it to:
a =
1 2 3 4
2 5 6 7
3 6 8 9
4 7 9 1
(transpose and keep the original upper triangular values)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
a = A + triu(A, 1)'does what you want (assuming real matrices or you want a Hermitian matrix for complex values).