필터 지우기
필터 지우기

Using .' instead of ' for transpose

조회 수: 11 (최근 30일)
Andrew
Andrew 2014년 7월 14일
댓글: Andrew 2014년 7월 14일
Hello, this is somewhat of a theory question.
I am wondering why I frequently see .' instead of just ' when computing the transpose of a matrix. I performed some tests myself and saw that this is generally a little faster but why is it faster? what is the difference in the internal implementation of .' as opposed to just '?
I've just been wondering about this and wanted to see what other people's thoughts are.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 7월 14일
편집: Azzi Abdelmalek 2014년 7월 14일
.' is used to transpose complex numbers, because if for example a is a complex array
a=[4+5i 2-i]
a' % is the conjugate and transpose
a.' % is the transpose
  댓글 수: 1
Andrew
Andrew 2014년 7월 14일
Ah, I see, that makes sense but why then is .' faster? Is it because it doesn't check for complex numbers?

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

추가 답변 (1개)

James Tursa
James Tursa 2014년 7월 14일
For complex matrices, see Azzi's answer. You are doing a little extra work for the conjugate part.
For real matrices, I don't know that there is any difference in implementation. In fact, I would expect both to call exactly the same underlying routine to do the work. I would suspect that any difference in run times you are seeing is quite small and if you make several tests you will see a variation in both methods but not much difference between the methods.
  댓글 수: 1
Andrew
Andrew 2014년 7월 14일
Thanks James,
I tried running some more tests and the times eventually did converge to almost exactly the same for a 1000 by 1000 matrix.

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

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by