Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the ' (single quote) operator in MATLAB?

Tags:

I've got some examples on how to use a government-supplied library file, but the examples are written in MatLab. Our project is in C#.

Could someone tell me what this means?

fid = fopen('d:\coilmodel\outlet.txt');
M = fscanf(fid, '%f', [7, inf]);
fclose(fid);
M = M';

I understand I am opening a text file and using that to populate a matrix M that is 7 floating points wide, then it closes the file.

What is M = M';?

I can duplicate all of this in my C# code except for the last line, and my only hurdle is I do not know what the action is doing.

Is this a transform?

Is the matrix being transposed?

I'd like to get a reference to this action so I can do further research.

like image 921
jp2code Avatar asked Jun 24 '10 14:06

jp2code


2 Answers

It is the complex conjugate transpose (or adjoint) of the matrix M, see here.

Note

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 .'.

like image 188
ShinTakezou Avatar answered Oct 01 '22 18:10

ShinTakezou


Note that ' is the CTRANSPOSE operator in MATLAB. If you don't want the complex conjugate, use .' which is the TRANSPOSE method.

like image 33
Edric Avatar answered Oct 01 '22 18:10

Edric