Vous êtes sur la page 1sur 4

clc

clear all
T=0.01;
t=0:T:1;
A=5;
w=2*pi;
y=A*sin(w*t);
plot(t,y);
--------------------
clc
clear all
T=0.02;
t=0:T:1;
A=5;
w=2*pi;
y=A*sin(w*t);
atem(t,y);
-----------------
clc
clear all
tmax=1
N=100
t=0:tmax/N:(tmax/N);
A=5;
w=4*pi;
y=A*sin(w*t);
x=-10*t;
for i=1:N
m(i)=x(i)*y(i);
end
plot(t,m,t,y,t,x)
grid on
-------
clc
clear all
tmax=1;
N=1000;
t=0:tmax/N:(tmax-tmax/N);
A=5;
w=4*pi;
y=A*sin(w*t);
x=5e^(-10*t);
for i=1:N
m(i)=x(i)*y(i);
end
plot(t,m,t,y,t,x)
grid on
___________________
clc
clear all
clear all
tmax=1;
N=100;
t=0:tmax/N:(tmax-tmax/N);
A=5;
w=4*pi;
y1=A*sin(w*t);
plot(t,y1)
t2=t+0.2;
y2=A*sin(w*t2);
hold on
plot(t,y2,'r')
-------------------
clc;
clear all;
close all;
plot([-2 21], [0 0], 'k-');
hold on;
plot([0 0], [-5 5]);
hold on;
grid on;
axis([-2 21 -5 5],'square');
tmax=1;
N=100;
t0=-tmax-tmax/N;
t1=-tmax:tmax/N:0;
t2=0:tmax/N:tmax;
t3=tmax+tmax/N;
x0=0;
x1=3-t1;
x2=3+t2;
x3=0;
t=[t0,t1,t2,t3];
x=[x0,x1,x2,x3];
plot(t,x);
hold on;
tt=(t+8)/0.5;
y=x;
plot(tt,y);
legend ('location','southeast');
___________________________________
clc;
clear all;
close all;
plot([-2 6], [0 0], 'k-');
hold on;
plot([0 0], [-5 5]);
hold on;
grid on;
axis([-2 6 -5 5],'square');
tmax=1;
N=100;
t0=-tmax-tmax/N;
t1=-tmax:tmax/N:0;
t2=0:tmax/N:tmax;
t3=tmax+tmax/N;
x0=0;
x1=3-t1;
x2=3+t2;
x3=0;
t=[t0,t1,t2,t3];
x=[x0,x1,x2,x3];
plot(t,x);
hold on;
tt=(t+3)/4;
y=x;
plot(tt,y);
____________________________
clc;
clear all;
close all;
plot([-2 6], [0 0], 'k-');
hold on;
plot([0 0], [-5 5]);
hold on;
grid on;
axis([-2 6 -5 5],'square');
tmax=1;
N=100;
t0=-tmax-tmax/N;
t1=-tmax:tmax/N:0;
t2=0:tmax/N:tmax;
t3=tmax+tmax/N;
x0=0;
x1=3-t1;
x2=3+t2;
x3=0;
t=[t0,t1,t2,t3];
x=[x0,x1,x2,x3];
plot(t,x);
hold on;
tt=-t+4;
y=-x;
plot(tt,y);

Vous aimerez peut-être aussi