What is the ' (single quote) operator in MATLAB?
[code that does not change the question snipped] M = M';
What is M = M';?
It is the transpose of the matrix M. See here.
As Edric specified, ' it's the CTRANSPOSE, i.e. the “adjoint matrix or (complex) conjugate transpose”, which gives the same result when applied on real matrices, but on complex matrices
negates the sign of the imaginary part of the complex elements in A
If you need only to
interchanges the row and column index for each element
then you will use .'.
Note that ' is the CTRANSPOSE operator in MATLAB. If you don't want the complex conjugate, use .' which is the TRANSPOSE method.