Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %Program reazlizuje sume 2 sygnalow sinusoidalnych
- t = 0:0.001:1-0.001; % wektor czasu
- A1 = 1; A2 = 0.5; % amplitudy sinusoid
- f1 = 2; f2 = 20; % czestotliwosci sinusoid
- x1 = A1 * sin(2*pi*f1*t); % pierwsza sinusoida
- x2 = A2 * sin(2*pi*f2*t); % druga sinusoida
- xs = x1 + x2; % suma sinusoid
- %subplot (3,1,1); % podzielenie obaszru na 3 czesci
- %plot (t, x1); % kreslenie wykresu pierwszej sinusoidy w pierwszym obszarze
- %xlabel ('czas t [s]'); % opis osi x (poziomej)
- %ylabel ('sygnal 1'); % opis osi y
- %subplot (3,1,2);
- %plot (t, x2);
- %xlabel ('czas t [s]'); % opis osi x (poziomej)
- %ylabel ('sygnal 2'); % opis osi y
- %subplot (3,1,3);
- %plot (t, xs);
- %xlabel ('czas t [s]'); % opis osi x (poziomej)
- %ylabel ('suma sygnalow'); % opis osi y
- subplot (1,1,1);
- plot(t, x1, 'r'); grid on
- hold on
- plot(t, x2, 'g')
- hold on
- plot(t, xs, 'o')
- hold on
- title ('2 sygnaly sinus i ich suma')
- xlabel ('czas t [s]')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement