Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % clear;
- % close all
- % f0 = 1800;
- % U = 1200;
- % T = 1/U;
- % T1 = 1/f0;
- % q = 4;
- % shag = 5;
- % f = -11000:shag:11000;
- % spec_sig = zeros(q, length(f));
- % i0 = [0, 0, 1, 1];
- % i1 = [0, 1, 0, 1];
- % Am = 1;
- % %Амплитудные спектры
- %
- % for i = 1:q
- % s_i1 = Am*(1-(2*i0(i)/(sqrt(q)-1)));
- % s_i2 = Am*(1-(2*i1(i)/(sqrt(q)-1)));
- % spec_sig(i,:) = s_i1*sqrt(T1/2)*(sinc((f-f0)*T1) + sinc((f+f0)*T1)).*exp(1j*pi*f*T1) + s_i2/1j*sqrt(T1/2)*(sinc((f-f0)*T1) - sinc((f+f0)*T1)).*exp(1j*pi*f*T1);
- % subplot(2,2, i), plot(f(length(f)/2:length(f)), abs(spec_sig(i, length(f)/2:length(f)))), xlabel('f'), ylabel('spec-sig_i(f)');
- % grid on;
- % %disp(i);
- % %disp(abs(S(i)));
- % end
- clear;
- close all
- l = 45;
- T0 = 2;
- f0 = l/T0;
- t = 0:1/1000*T0:T0;
- f1 = (2/T0)^(1/2)*cos(2*pi*f0*t);
- f2 = (2/T0)^(1/2)*sin(2*pi*f0*t);
- F1 = 1800;
- T = 2/F1;
- TIME = 0:T/1000:T;
- sig1 = (2/T)^(1/2)*cos(2*pi*F1*TIME)+(2/T)^(1/2)*sin(2*pi*F1*TIME);
- plot(t, f1, t, f2);
- figure(2);
- plot(TIME,sig1);
- % доказательство пункт 2
- f11 = sqrt(sum(f1.*f1));
- f22 = sqrt(sum(f2.*f2));
- f1 = f1./f11;
- f2 = f2./f22;
- scal1 = (sum(f1.*f1));
- disp(scal1);
- scal2 = (sum(f1.*f2));
- disp(scal2);
- scal3 = (sum(f2.*f2));
- disp(scal3);
- %часть 2
- q = 4;
- i0 = [0, 0, 1, 1];
- i1 = [0, 1, 0, 1];
- Am = 1;
- s_x = zeros(0,q);
- s_y = zeros(0,q);
- for i = 1:q
- s_x(i) = Am*(1-(2*i0(i)/(sqrt(q)-1)));
- s_y(i) = Am*(1-(2*i1(i)/(sqrt(q)-1)));
- end
- figure(3);
- for i=1:q
- plot(s_x(i), s_y(i),'o','Color', 'k');
- hold on;
- end
- axis([-2 2,-2,2]);
- grid on;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement