Last active
August 29, 2015 14:09
-
-
Save tolribeiro/cbf461ba71e6b1857bcb to your computer and use it in GitHub Desktop.
Revisions
-
Thiago Ribeiro revised this gist
Nov 13, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ % Definicao da mensagem %------------------------------------------------------------------- f2 = 2; % frequencia do sinal de entrada u = square(2*pi*f2*t); % sinal a ser transmitido subplot(3,1,2); plot(t,u); % plotagem do grafico xlabel('time'); @@ -33,7 +33,7 @@ %------------------------------------------------------------------- % Sinal modulado em PSK %------------------------------------------------------------------- v = x.*u; % Portadora multiplicada por mensagem subplot(3,1,3); plot(t,v); % Plotagem grafico (PSK) xlabel('t'); -
Thiago Ribeiro created this gist
Nov 13, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ %------------------------------------------------------------------- % PSK Modulator - Communication Systems % By Thiago Ribeiro % Language: PT-BR. %------------------------------------------------------------------- %------------------------------------------------------------------- % Definicao portadora %------------------------------------------------------------------- A = 5; % amplitude t = 0:.001:1; f1 = 10; % frequencia da portadora x = A.*sin(2*pi*f1*t); % funcao da portadora (seno) subplot(3,1,1); plot(t,x); % plotagem do grafico xlabel('time'); ylabel('Amplitude'); title('Portadora'); grid on; %------------------------------------------------------------------- % Definicao da mensagem %------------------------------------------------------------------- f2 = 2; % frequencia do sinal de entrada u=square(2*pi*f2*t); % sinal a ser transmitido subplot(3,1,2); plot(t,u); % plotagem do grafico xlabel('time'); ylabel('Amplitude'); title('Message Signal'); grid on; %------------------------------------------------------------------- % Sinal modulado em PSK %------------------------------------------------------------------- v=x.*u; % Portadora multiplicada por mensagem subplot(3,1,3); plot(t,v); % Plotagem grafico (PSK) xlabel('t'); ylabel('v'); title('PSK'); grid on;