All zeros result when concatenating a complex vector with its conjugate

조회 수: 1 (최근 30일)
So, I have a double complex matrix, P, which is 15251x1024 and I want to convert it to a 15251x2048 matrix with hermitian symmetry in its rows. That means, I have to flip each row, calculate its conjugate and then concatenate both results. I tried to do so with the code below, but the result is that P has 0.000 + i0.000 value in every single cell.
aux_P = P;
frameSize=2048;
P = zeros(15251,frameSize);
for i =1:15251
P(i,:) = [aux_P(i,:), flip(conj(aux_P(i,:)))];
end
Does anybody knows where the error is? I tried to run it using the debugger, row by row, and the result is properly calculated, which blowed my mind.
PD: Sorry I can't attach the P.mat file, as it is larger than 5 MB, but it mostly has values different from 0.
EDIT: I changed P = zeros(15251,frameSize); to P = ones(15251,frameSize); and the result now is an all-1s matrix

채택된 답변

Torsten
Torsten 2018년 7월 13일
편집: Torsten 2018년 7월 13일
aux_P = P;
frameSize=2048;
P = zeros(15251,frameSize);
P = [aux_P, flip(conj(aux_P),2)];
works for me.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by