1

In matlab I have a matrix As

As = zeros(m, n);

Next I assign values to As and transpose the specific columns:

for idx = 1:n
   % Assign value to As, then assign to 'a' and 's'
   a = As(:, idx)';
   s = As(:, idx);
end

Then s is a column vector like:

s = [0.1 - 0.2i
     0.3 + 0.4i]

But elements in a have the flipped signs:

a = [0.1 + 0.2i, 0.3 - 0.4i]

This is confusing me, I mean the transpose of s should be a row (no problem) with the symbols in the order -, + like

a = [0.1 - 0.2i, 0.3 + 0.4i]

Can anyone tell me what the problem is?

Wolfie
  • 27,562
  • 7
  • 28
  • 55
马慧超
  • 183
  • 1
  • 10

1 Answers1

4

The prime operator ' in matlab is actually an alias to ctranspose, which does not only convert rows to columns, or columns to rows of ordinary matrices or vectors, but also calculates the complex conjugate, i.e. changes the sign of the imaginary part.

The non-conjugate transpose operator A.', performs a transpose without conjugation. That is, it doesn't change the imaginary parts of the elements.

Aki Suihkonen
  • 19,144
  • 1
  • 36
  • 57