# In Pskmod Code: Reshaping the output signal using the transpose operator .' , Introduce a sign change.

1 回表示 (過去 30 日間)
Ranya 2024 年 7 月 7 日

In the Pskmod implemented matlab code, the last part is:
% --- restore the output signal to the original orientation --- %
if(wid == 1)
y = y.';
end
..
The issue is that: the pskmod function handles the output format for complex numbers (data with real and imaginary parts). The function tries to reshape the output. However, using the single quote transpose (.') on complex numbers can cause the imaginary component's sign to flip.
how to solve this issue?

サインインしてコメントする。

### 回答 (1 件)

John D'Errico 2024 年 7 月 7 日

No. You have it wrong. Completely backwards, in fact. The .' operator does NOT cause a sign flip. That is called a conjugation. The ' operator does cause a sign change when it transposes the elements, and it ALWAYS flips the sign of any imaginary part. There is no maybe about it. Thus we would have
X = [1+i, -1-2i, 1, -3, i]
X =
1+1i -1-2i 1+0i -3+0i 0+1i
The conjugate transpose operator, formed using ' but also called ctranspose, as applied to X:
X'
ans =
1 - 1i
-1 + 2i
1 + 0i
-3 + 0i
0 - 1i
help ctranspose
' Complex conjugate transpose.
X' is the complex conjugate transpose of X.
B = ctranspose(A) is called for the syntax A' (complex conjugate transpose)
when A is an object.
See MATLAB Operators and Special Characters for more details.
Documentation for ctranspose
Other uses of ctranspose
Next, the standard non-conjugated transpose operator. It does NOT change the sign of any imaginary parts.
X.'
ans =
1 + 1i
-1 - 2i
1 + 0i
-3 + 0i
0 + 1i
help transpose
.' Transpose.
X.' is the non-conjugate transpose.
B = transpose(A) is called for the syntax A.' when A is an object.
See MATLAB Operators and Special Characters for more details.
Documentation for transpose
Other uses of transpose
So use whichever is appropriate.

サインインしてコメントする。

R2020a

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by