Documentos de Académico
Documentos de Profesional
Documentos de Cultura
subplot(6,2,2);
plot(t,xt,'b','linewidth',2);
xlabel('tiempo [s]');
ylabel('Amplitud');
grid on;
title 'Señal portadora';
hold on;
subplot(6,2,3:4);
plot(t,AM_t,'g','linewidth',2);
xlabel('tiempo [s]');
ylabel('Amplitud');
grid on;
title 'Portadora modulada';
hold on;
subplot(6,2,6);
plot(Fnorm,Es_x,'b','linewidth',2);
xlabel('frecuencia [Hz]');
ylabel('|F(w)|');
grid on;
title 'Espectro de señal portadora';
xlim([-100 100]);
hold on;
subplot(6,2,7:8);
plot(Fnorm,Es_AM,'g','linewidth',2);
xlabel('frecuencia [Hz]');
ylabel('|F(w)|');
grid on;
title 'Espectro de portadora modulada';
xlim([-100 100]);
hold on;
C) ammod y amdemod
Se utiliza funciones para comparar
%%Tercera parte - punto C
Smod = ammod(mt,fc,fs);
Sdemod = amdemod(AM_t,fc,fs);
subplot(6,2,9);
plot(t,Smod,'r','linewidth',2);
xlabel('tiempo [s]');
ylabel('Amplitud');
grid on;
title 'ammod';
hold on;
subplot(6,2,10);
plot(t,Sdemod,'b','linewidth',2);
xlabel('tiempo [s]');
ylabel('Amplitud');
grid on;
title 'amdemod';
hold on;
subplot(6,2,11:12);
plot(t,mt,'g','linewidth',2);
xlabel('tiempo [s]');
ylabel('Amplitud');
grid on;
title 'señal original';
hold on;
close all
clear all
fm=input('Introduzca frecuencia de muestreo: ');
fs=input('Introduzca frecuencia de la señal: ');
fc=input('Introduzca frecuencia de la señal portadora: ');
%MODULACION FM
t=0:1/fm:5; %definiendo el tiempo real
L=length(t); %sacando la longitud del vector tiempo
f1=sin(2*pi*fs*t); %señal de información
subplot(2,2,1);
plot(t(1:500),f1(1:500), 'r');
title('señal de entrada'),grid on,xlabel('tiempo'),ylabel('m(t)')
f2=cos(2*pi*fc*t);
subplot(2,2,2);
plot(t(1:100),f2(1:100));
title('señal portadora'),grid on,xlabel('tiempo')
f3=cos(2*pi*fc*f1);
subplot(2,2,3:4);
plot(t(1:500),f3(1:500));
title('señal modulada'),grid on,xlabel('tiempo'),
pause
g1=abs(fftshift(fft(f1)))/L; %transformando en frecuencia f1
k=[(-L/2)+1:L/2];
k1=(1/(0.795*2*pi))*k;
figure
subplot(6,2,6);
plot(Fnorm,Es_x,'b','linewidth',2);
xlabel('frecuencia [Hz]');
ylabel('|F(w)|');
grid on;
title 'Espectro de señal portadora';
xlim([-100 100]);
hold on;
subplot(6,2,7:8);
plot(Fnorm,Es_AM,'g','linewidth',2);
xlabel('frecuencia [Hz]');
ylabel('|F(w)|');
grid on;
title 'Espectro de portadora modulada';
xlim([-100 100]);
hold on;
3.
A) modulación en el dominio del tiempo
El flujo de bits [1 1 1 0 0 0 1 1 1] podemos apreciarlo en la primera gráfica, en eje x
desde el punto 0 hasta 3 tenemos 1, desde el punto 3 hasta el 6 tenemos 0 y desde
el punto 6 hasta el 9 tenemos 1.
clear;
clc;
b = [1 1 1 0 0 0 1 1 1];
n = length(b);
t = 0:.01:n;
x = 1:1:(n+1)*100;
for i = 1:n
if (b(i) == 0)
b_p(i) = -1;
else
b_p(i) = 1;
end
for j = i:.1:i+1
bw(x(i*100:(i+1)*100)) = b_p(i);
end
end
bw = bw(100:end);
sint = sin(2*pi*t);
st = bw.*sint;
subplot(3,1,1)
plot(t,bw)
grid on ; axis([0 n -2 +2])
subplot(3,1,2)
plot(t,sint)
grid on ; axis([0 n -2 +2])
subplot(3,1,3)
plot(t,st)
grid on ; axis([0 n -2 +2])