• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Untitled

a guest May 24th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. N = 16;
2. f1 = 0:1023;
3. f2 = 0:7;
4. T = 0.002;
5. df1 = 1;
6. df2 = 3;
7. P = 1000;
8. %Выделение памяти
9. R = zeros(N, N);
10. K = zeros(N, N);
11. f = zeros(N, N);
12. %z = zeros(N, length(f1));
13.
14. z = (e.^(1i.*2.*pi.*T.*(1:N).'.*f1))./sqrt(N);
15. s = (e.^(1i.*2.*pi.*T.*(1:N).'.*f2))./sqrt(N);
16.
17. a2 = ((pi*df2)^2)/(4*log(2));
18. c2 = P*e.^(-a2.*((0:N-1).*T).^2);
19. R = toeplitz(c2);
20.
21. a1 = ((pi*df1)^2)/(4*log(2));
22. c1 = e.^(-a1.*((0:N-1).*T).^2);
23. K = toeplitz(c1);
24.
25. #Вывод графика N/2 строки K
26. %plot(K(N/2, :));
27.
28. #Вывод графика первых 4 собственных векторов
29. [U, S, V] = svd(K);
30. %plot(U(:, 1:4));
31.
32. #f - собственные вектора, u - собственные значения
33. [f, u] = eig(K, "vector");
34. yk = f.'*s'.';
35. ym = f'*s;
36. uk = yk./u;
37. um = ym./u;
38. qkm = f.'*R*f;
39. A = uk.'*qkm*um
40.
41. bk = (f'.')*z;
42. %ans = (abs(bk.'*uk)).^2/A;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top