skman
New Member
أريد برنامج يرسم تضمين التردد بأستخدام المتلاب وياليت يكون شبيه للبرنامج التالي :
clear all;
close all;
A=1; m=0.5; T=0.05;
fm=1/T; fc=100*fm;
f1=10*fm; t=-0.2:1/fc:0.2; N=length(t);
f=fc*(-N/2:N/2-1)/N;
y=cos(2*pi*fm*t); y1=sin(2*pi*fm*t);
c=cos(2*pi*f1*t); c1=sin(2*pi*f1*t);
xam=A*(1+m*y).*c;
XAM=fftshift(fft(xam)/N);
xdsb=y.*c;
XDSB=fftshift(fft(xdsb)/N);
xssbu=y.*c - y1.*c1;
XSSBU=fftshift(fft(xssbu)/N);
xssbl=y.*c + y1.*c1;
XSSBL=fftshift(fft(xssbl)/N);
figure(1)
subplot(411);plot(t,xam);grid on;
subplot(412);plot(t,xdsb);grid on;
subplot(413);plot(t,xssbu);grid on;
subplot(414);plot(t,xssbl);grid on;
figure(2)
subplot(411);plot(f,abs(XAM));grid on;
subplot(412);plot(f,abs(XDSB));grid on;
subplot(413);plot(f,abs(XSSBU));grid on;
subplot(414);plot(f,abs(XSSBL));grid on;
clear all;
close all;
A=1; m=0.5; T=0.05;
fm=1/T; fc=100*fm;
f1=10*fm; t=-0.2:1/fc:0.2; N=length(t);
f=fc*(-N/2:N/2-1)/N;
y=cos(2*pi*fm*t); y1=sin(2*pi*fm*t);
c=cos(2*pi*f1*t); c1=sin(2*pi*f1*t);
xam=A*(1+m*y).*c;
XAM=fftshift(fft(xam)/N);
xdsb=y.*c;
XDSB=fftshift(fft(xdsb)/N);
xssbu=y.*c - y1.*c1;
XSSBU=fftshift(fft(xssbu)/N);
xssbl=y.*c + y1.*c1;
XSSBL=fftshift(fft(xssbl)/N);
figure(1)
subplot(411);plot(t,xam);grid on;
subplot(412);plot(t,xdsb);grid on;
subplot(413);plot(t,xssbu);grid on;
subplot(414);plot(t,xssbl);grid on;
figure(2)
subplot(411);plot(f,abs(XAM));grid on;
subplot(412);plot(f,abs(XDSB));grid on;
subplot(413);plot(f,abs(XSSBU));grid on;
subplot(414);plot(f,abs(XSSBL));grid on;