Professional Documents
Culture Documents
2.2.4 Multiple Data Sets in One Plot
2.2.4 Multiple Data Sets in One Plot
2.2.4 Multiple Data Sets in One Plot
Cosine functions
y3 = 0.5*cos(x); 0
plot(x,y1,'--',x,y2,'-',x,y3,':')
xlabel('0 \leq x \leq 2\pi') -1
ylabel('Cosine functions')
legend('2*cos(x)','cos(x)','0.5*cos(x)') -2
title('Typical example of multiple plots')
axis([0 2*pi -3 3]) -3
0 1 2 3 4 5 6
0 x 2
ÉCHANTILLONNÉE
clc 0.5
echo on 0.4
t=0:.2:5; exp(-t)*sint(2*t),T=.2 seconde
signal échantillonné
stem(t,exp(- 0.3
t).*sin(2*t),'fill'); 0.2
xlabel('temps en seconde')
ylabel('signal échantillonné') 0.1
title('Signal Discret ou 0
Echantillonné')
gtext('exp(-t)*sint(2*t),T=.2 -0.1
seconde') -0.2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
grid temps en seconde
Signal Bloqué
0.6
t=0:.2:5;
stairs(t,exp(-t).*sin(2*t)); 0.5
Signal Bloqué
ylabel('Signal 0.3
Bloqué','FontSize',14) 0.2
title('Signal Bloqué',
'FontSize',18) 0.1
text(1,2.5,'e^{- 0
\alpha*t}*sint\beta*t, T = .2
seconde') -0.1
grid -0.2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
t=0:.2:5 (temps en seconde)
Signal Analogique, Signal Numérique
t=0:.2:5; 0.6
f= exp(-t).*sin(2*t); 0.5
hold on
stem(t,0.1*fix(f/.1),'fill'); 0.4 Quantification d'amplitude: 0.1
stairs(t,f); 0.3
xlabel('temps (en
seconde)','FontSize',14) 0.2
%impultion unité
0.9
clear all ;
clc 0.8
n=-10:10; 0.6
amplitud
x=[zeros(1,10),1,zeros(1,10)]; 0.5
figure(1);
0.4
stem(n,x);
0.3
title('impultion unité');
grid on 0.2
xlabel('n'); 0.1
ylabel('amplitud') 0
-10 -8 -6 -4 -2 0 2 4 6 8 10
n
clear all 1.5
Echelon unité
clc
close all
%2 génération impultion unité 1
%Echelon unité
n=-10:10;
x=[zeros(1,10),ones(1,11)];
amplitud
0.5
figure(2);
stem(n,x);
grid on 0
axis([-15 15 -.5 1.5]);
title('Echelon unité');
xlabel('n'); -0.5
ylabel('amplitud') -15 -10 -5 0
n
5 10 15
sinus
% 3A sinus 1.5
amplitude
0
grid on
axis([-15 15 -1.5 1.5]);
-0.5
title('sinus');
xlabel('n');
-1
ylabel('amplitude')
-1.5
-15 -10 -5 0 5 10 15
n
exponentielle retardée
clear all ; 1.5
clc
close all 1
% 3B exponentiel
n=-10:10; 0.5
u=[zeros(1,10),ones(1,11)];
amplitud
x=exp(-0.2*n).*u; 0
figure(4);
stem(n,x); -0.5
grid on
axis([-10 10 -1.5 1.5]); -1
title('exponentielle retardée');
xlabel('n'); -1.5
-10 -8 -6 -4 -2 0 2 4 6 8 10
ylabel('amplitud') n