Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Завдання 10
- t = t0 : dt : t0 + T-dt;
- newC = c(N : -1 : 1);
- for n = 1 : 1 : N
- s = 0;
- for k = N : -1 : 1
- A = (%pi * %i * (k - 1)) / 5;
- s = s + (newC(k) * exp(A * t(n)));
- end;
- x(n) = real(s);// відтворена послідовність
- end;
- k = 1 : 1 : N
- figure(5, 'BackgroundColor', [1,1,1]);
- subplot(2,1,1), plot2d(k, real(newC)), title('real(newC)','position',[N/2,max(real(newC))/2]);
- subplot(2,1,2), plot2d(k, imag(newC)), title('imag(newC)','position',[N/2,max(imag(newC))/2]);
- T = 10;
- t0 = 0;
- dt = T/N;
- qw = N * ifft(newC);//OШПФ
- //Завдання 11
- k = 1 : 1 : N
- figure(6, 'BackgroundColor', [1,1,1]);
- subplot(2,1,1), plot2d(t,(xx)), title('Input data - x(n)','position',[N/2,max(real(newC))/2]);
- subplot(2,1,2), plot2d(k, (qw),), title('Reprodused data - x(n)','position',[T/2,max(real(qw))/2]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement