tarea osman 18_11

5
syms t n >> Xt=cos(4000*pi*t)+cos(10000*pi*t)+cos(18000*pi*t); >> Xn=cos(4000*pi*n/18000) + cos(10000*pi*n/18000) + cos(18000*pi*n/18000); >> T=1/1000;N=18; >> t=linspace(0,T,1000); >> Xt=Xt; >> Xt=cos(4000*pi*t)+cos(10000*pi*t)+cos(18000*pi*t); >> plot(t,Xt); >> hold on; >> plot(t,cos(4000*pi*t),'r');plot(t,cos(10000*pi*t),'m');plot(t,cos(18000*pi*t),'g '); >> title('Xt=cos(4000\pit)+cos(10000\pit)+cos(18000\pit)');xlabel('t'); >>legend({'cos(4000\pit)+cos(10000\pit)+cos(18000\pit)','cos(4000\pit)','cos(10000\pit)','cos(1800 0\pit)'}); >> n=0:N; >> Xn=cos(4000*pi.*n/18000) + cos(10000*pi.*n/18000) + cos(18000*pi.*n/18000); >> hold off

Upload: sergio-liberati

Post on 22-Jan-2017

73 views

Category:

Science


1 download

TRANSCRIPT

Page 1: Tarea osman 18_11

syms t n

>> Xt=cos(4000*pi*t)+cos(10000*pi*t)+cos(18000*pi*t);

>> Xn=cos(4000*pi*n/18000) + cos(10000*pi*n/18000) + cos(18000*pi*n/18000);

>> T=1/1000;N=18;

>> t=linspace(0,T,1000);

>> Xt=Xt;

>> Xt=cos(4000*pi*t)+cos(10000*pi*t)+cos(18000*pi*t);

>> plot(t,Xt);

>> hold on;

>> plot(t,cos(4000*pi*t),'r');plot(t,cos(10000*pi*t),'m');plot(t,cos(18000*pi*t),'g ');

>> title('Xt=cos(4000\pit)+cos(10000\pit)+cos(18000\pit)');xlabel('t');

>>legend({'cos(4000\pit)+cos(10000\pit)+cos(18000\pit)','cos(4000\pit)','cos(10000\pit)','cos(1800

0\pit)'});

>> n=0:N;

>> Xn=cos(4000*pi.*n/18000) + cos(10000*pi.*n/18000) + cos(18000*pi.*n/18000);

>> hold off

Page 2: Tarea osman 18_11

>> stem(n,Xn);

>> title('cos(2\pin/9) + cos(5\pin/9) + cos(\pin)');xlabel('n');legend({'cos(2\pin/9) + cos(5\pin/9) +

cos(\pin'});

>> Xn=cos(2*pi*n/9) + cos(5*pi*n/9) + cos(pi*n);

>> Xn=1/2*(exp(i*2*pi*n/9)+exp(-i*2*pi*n/9))+1/2*(exp(i*5*pi*n/9)+exp(-

>> (pi);N/2*(2*pi/N);18/2*(2*pi/N);9*(2*pi/N);

Se acomodan los argumentos de los exponentes para realizar inspección con:

𝑥[𝑛] = ∑ 𝑎𝑘𝑒𝑗𝑘(

2𝜋𝑁)𝑛

𝑘=<𝑁>

;

>> [(2*pi/9)/(2*pi/N) (5*pi/9)/(2*pi/N) pi/(2*pi/N)]

ans =

2 5 9

%se compara y se llega a la conclusión de que los términos son:

Page 3: Tarea osman 18_11

𝑎𝑘 → 𝑎−2 = 𝑎2 = 𝑎−5 = 𝑎5 = 𝑎−9 = 𝑎9 =1

2

>> n_FXn=-9:9;

>> FXn=1/2*[1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1];

>> stem(n_FXn,FXn)

>> title('a_k de x[n]');xlabel('k');

>> Xt=cos(4000*pi*t)+cos(10000*pi*t)+cos(18000*pi*t);

>> %se descompone con formula de Euler;

>> Xt=1/2*(exp(i*4000*pi*n)+exp(-i*4000*pi*n))+1/2*(exp(i*10000*pi*n)+exp(-

i*10000*pi*n))+1/2*(exp(i*18000*pi*n)+exp(-i*18000*pi*n));

>> pretty(Xt)

exp(-4000 pi n i) exp(4000 pi n i) exp(-10000 pi n i) exp(10000 pi n i)

----------------- + ---------------- + ------------------ + ----------------- +

2 2 2 2

Page 4: Tarea osman 18_11

exp(-18000 pi n i) exp(18000 pi n i)

------------------ + -----------------

2 2

>> %se acomodan los exponentes para que queden de la forma

𝑥(𝑡) = ∑ 𝑎𝑘𝑒𝑗𝑘(

2𝜋𝑇)𝑡

+∞

𝑘=−∞

;

>> [(4000*pi)/(2*pi/T) (10000*pi)/(2*pi/T) (18000*pi)/(2*pi/T)]

ans =

2.0000 5.0000 9.0000

%se compara y se llega a la conclusión de que los términos son:

𝑎𝑘 → 𝑎−2 = 𝑎2 = 𝑎−5 = 𝑎5 = 𝑎−9 = 𝑎9 =1

2

>> FXt=1/2*[1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1];

>> n_FXt=-9:9;

>> stem(n_FXt,FXt)

>> title('a_k de x(t)');xlabel('k');

Page 5: Tarea osman 18_11

%Comparacion:

%

%

%

%

%

%

%

%

Ya que