Using .' instead of ' for transpose
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Andrew
am 14 Jul. 2014
Kommentiert: Andrew
am 14 Jul. 2014
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.
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 14 Jul. 2014
Bearbeitet: Azzi Abdelmalek
am 14 Jul. 2014
.' 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
Weitere Antworten (1)
James Tursa
am 14 Jul. 2014
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.
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!