What is matlab. "(Dot-quote) designation?

Trying to understand MATLAB syntax: I see that

(0:3) 

is the line vector that the ' (forward-quote) transpose operator is, therefore

 (0:3)' 

is the column vector. I also saw .' in some files, and they also create column vectors, so

 (0:3).' 

gives the same result as (0:3) .

What is the difference between ' and .' ? I did not find anything in MATLAB docs to help me figure this out.

(note that this question concerns the syntax, first of all, not about the difference between transpose and ctranspose , because if you do not know that ' is one, but .' is another, the answer to the transpose question compared to ctranspose did not help answer the question . compared to '. In many examples and tutorials, MATLAB ' displays erroneously and inaccurately as transpose , and that fact leads to the question when the user first encounters .' .)

+6
source share
1 answer

There is no difference for real numbers. For complex numbers .' will create transposition, and ' will create complex conjugation .

 >> [i -i].' ans = 0.0000 + 1.0000i 0.0000 - 1.0000i >> [i -i]' ans = 0.0000 - 1.0000i 0.0000 + 1.0000i 

By the way, every Matlab statement has a name that can be used to read documentation.

  • .' - transpose
  • ' - ctranspose

Although they are sometimes difficult to find in the documentation. Most of them can be found in here , but you will need to guess which one is the operator.

+9
source

Source: https://habr.com/ru/post/984799/


All Articles