How to adjust time scale so that when this code is executed ,in frequency domain plot the frequency axis gives value like 2*10^6 ,3*10^6 not simple 2,3

조회 수: 2 (최근 30일)
clc
close
M =8; %here we initialize the number of constellation point of qam
no_of_data_points = 128;
data_source= abs(round(randn(1,10)));%here we take random normal function
figure(1);
stem(data_source);
grid on;
xlabel('Data Points');
ylabel('transmitted data phase representation');
title('Transmitted Data'); %here we plot that transmitted data
qam_modulated_data = qammod(data_source, M); %here we perform 8bit qam on the random normal function
scatterplot(qam_modulated_data);
title('MODULATED TRANSMITTED DATA');%here we plot those constellation point
qam_modulated_data1(1:(M/2))=qam_modulated_data(1:(M/2)); %here we introduce another array named qam_modulated_data1 where first four element is first four constellation point
qam_modulated_data1(((M/2)+1):M)=-qam_modulated_data(1:(M/2));% in my qam_modulated_data1 array last four point is Hermitian of first four point
y=fft(qam_modulated_data1); %here we apply fast Fourier transform on the data of qam_modulated_data1 array
figure(3);
stem(y); %here we plot that fft result
grid on;
xlabel('frequency');
ylabel('amplitude');
title('odd frequency suppressed output');
yc=conj(y);
real_y=y.*yc ;
figure(4);
stem(real_y);
grid on;
xlabel('frequency');
ylabel('amplitude of real values of fft');
title('real value of fft');
1.how to make amplitudes positive?
2.what the changes should be done so that freq axis we get 1*10^6,2*10^6 not just 1,2.
please help.
  댓글 수: 2
Matt Gaidica
Matt Gaidica 2020년 12월 15일
편집: Matt Gaidica 2020년 12월 15일
  1. Can you multiply by -1?
  2. Pass in x-values to the stem() function.
x = [1*10^6, 2*10^6]);
stem(x, real_y*-1);
Dipsikha Roy
Dipsikha Roy 2020년 12월 15일
What command should be used to get a graph like this..i want to see the path as well not only points..scatterplot gives me the point only..can u help me please..🙏

댓글을 달려면 로그인하십시오.

답변 (0개)

커뮤니티

더 많은 답변 보기:  Power Electronics Community

카테고리

Help CenterFile Exchange에서 Modulation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by