hitman1988
Member level 5
Hi all
i had the following matlab code and it is work well , but the problem is with sampling frequency of the plot of the third plot , it should be an AM modulated signal but it doesn't look like that .
can anyone help with this please ?
the code is
%Amplitude Modulation of laser 193THz
N = 1150; %N point FFT N>fc to avoid freq domain aliasing
fs =1023 ; % sample frequency
t = (0:N-1)/fs;
M = 200; % M point FFT N>fc to avoid freq domain aliasing
fsi = 180;
ti = (0:M-1)/fsi ;
K = 1150; % K point FFT N>fc to avoid freq domain aliasing
fsk = 1023 ;
tk = (0:K-1)/fsk ;
Fc=193*10^12;
Fm=7*10^9;
Vc=5*sin(2*pi*Fc*t);
Vm=5*sin(2*pi*Fm*ti);
V=5*sin(2*pi*Fc*t)+(5/2)*cos(2*pi*(Fc-Fm)*t)-(5/2)*cos(2*pi*(Fc+Fm)*t);
figure('Name','Carrier & Message');
subplot(2,1,1); %Carrier plot
plot(t(1:N/2),Vc(1:N/2));
title('Carrier(Laser)');
xlabel('Time'); ylabel('Vc');
subplot(2,1,2); %message plot
plot(ti(1:M/2),Vm(1:M/2),'r');
title('Message signal');
xlabel('Time'); ylabel('Magnitude');
figure('Name','direct modulation of laser using AM mod.');
subplot(2,1,1); %Time domain plot
plot(tk(1:K/2),V(1:K/2));
title('AM Modulated Signal');
xlabel('Time'); ylabel('AM');
the problem is with the following :
figure('Name','direct modulation of laser using AM mod.');
subplot(2,1,1); %Time domain plot
plot(tk(1:K/2),V(1:K/2));
title('AM Modulated Signal');
xlabel('Time'); ylabel('AM');
the signal should be AM modulated signal but it don't
help me please
i had the following matlab code and it is work well , but the problem is with sampling frequency of the plot of the third plot , it should be an AM modulated signal but it doesn't look like that .
can anyone help with this please ?
the code is
%Amplitude Modulation of laser 193THz
N = 1150; %N point FFT N>fc to avoid freq domain aliasing
fs =1023 ; % sample frequency
t = (0:N-1)/fs;
M = 200; % M point FFT N>fc to avoid freq domain aliasing
fsi = 180;
ti = (0:M-1)/fsi ;
K = 1150; % K point FFT N>fc to avoid freq domain aliasing
fsk = 1023 ;
tk = (0:K-1)/fsk ;
Fc=193*10^12;
Fm=7*10^9;
Vc=5*sin(2*pi*Fc*t);
Vm=5*sin(2*pi*Fm*ti);
V=5*sin(2*pi*Fc*t)+(5/2)*cos(2*pi*(Fc-Fm)*t)-(5/2)*cos(2*pi*(Fc+Fm)*t);
figure('Name','Carrier & Message');
subplot(2,1,1); %Carrier plot
plot(t(1:N/2),Vc(1:N/2));
title('Carrier(Laser)');
xlabel('Time'); ylabel('Vc');
subplot(2,1,2); %message plot
plot(ti(1:M/2),Vm(1:M/2),'r');
title('Message signal');
xlabel('Time'); ylabel('Magnitude');
figure('Name','direct modulation of laser using AM mod.');
subplot(2,1,1); %Time domain plot
plot(tk(1:K/2),V(1:K/2));
title('AM Modulated Signal');
xlabel('Time'); ylabel('AM');
the problem is with the following :
figure('Name','direct modulation of laser using AM mod.');
subplot(2,1,1); %Time domain plot
plot(tk(1:K/2),V(1:K/2));
title('AM Modulated Signal');
xlabel('Time'); ylabel('AM');
the signal should be AM modulated signal but it don't
help me please