필터 지우기
필터 지우기

How to reflect the element above the diagonal of a matrix to the lower diagonal ?

조회 수: 6 (최근 30일)
How could I reflect all the upper element of a square matrix of size K = 3 to the lower side
Like this ?
Thank you very much

채택된 답변

Matt J
Matt J 2020년 7월 17일
편집: Matt J 2020년 7월 17일
b=triu(a)+triu(a,1).'; %the result
  댓글 수: 2
Tuong Nguyen Minh
Tuong Nguyen Minh 2020년 7월 19일
Why we use triu(a,1).' with the dot instead of triu(a,1)'
When I check it there was not much different, but is this dot usage a prefer engineering practice ?
Matt J
Matt J 2020년 7월 19일
편집: Matt J 2020년 7월 19일
.' means transpose
Without the dot, it is conjugate tranpose
As long as your matrices are real-valued, they should give the same result.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by