Can someone help me? - Plotting complex number with index
2 ビュー (過去 30 日間)
古いコメントを表示
adriane duarte
2021 年 5 月 26 日
コメント済み: Sulaymon Eshkabilov
2021 年 5 月 27 日
I plotted complex numbers as follows:

and I got some complex numbers, like for example:

result plot:

how do I put the corresponding bit values (1000,1100, ...) according to the example below???

Can someone help me?
0 件のコメント
採用された回答
Sulaymon Eshkabilov
2021 年 5 月 27 日
Hi,
Here is the answer to convert imaginary and real numbers from a floating point format into binary:
N = 16; % Number bits for integer part:
M = 25; % Number bits for fraction part:
% Conversion from floating point format into binary number
%% REAL Part:
for ii=1:numel(q_real)
BIN1(ii,:) = fix(rem(q_real(ii)*pow2(-(N-1):M),2));
% Test the inverse transformation
DEC1(ii) = BIN1(ii,:)*pow2(n-1:-1:-m).';
end
%% IMAG Part:
for ii=1:numel(q_imag)
BIN2(ii,:) = fix(rem(q_imag(ii)*pow2(-(N-1):M),2));
% Test the inverse transformation
DEC2(ii) = BIN2(ii,:)*pow2(n-1:-1:-m).';
end
Good luck.
2 件のコメント
その他の回答 (1 件)
Sulaymon Eshkabilov
2021 年 5 月 26 日
(1) Separate real and imaginary parts using real(), imag()
(2) PLot them: Real vs. Imag
(3) Convert the separated real and imaginary values (floating point numbers) to binary strings using:
and so forth.
4 件のコメント
参考
カテゴリ
Help Center および File Exchange で QPSK についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!