Está en la página 1de 4

syms t;

fs1=t+1;
m1=diff(fs1)
fs2=2;
m2=diff(fs2)
fs3=1;
m3=diff(fs3)
fs4=3-2*t;
m4=diff(fs4)
t=-3:0.01:3;
fs1=t+1;
fs2=2;
fs3=1;
fs4=3-2*t;
f=(fs1.*((t>=-2)&(t<-1))+fs2.*(t>=1&(t<0))+fs3.*(t>=0&(t<1))+fs4.*(t>=1&(t<=2)));
subplot (3,1,1)
plot(t,f,'b','LineWidth',1.5);
xlabel('t')
title(' Funcion x(t)')
axis ([-7 6 -3 3])
grid on;
fd1=1;
fd2=0;
fd3=0;
fd4=-2;
i1=(-1)*sinc(100*(t+2));
i2=(2)*sinc(100*(t+1));
i3=(-1)*sinc(100*(t));
i4=(1)*sinc(100*(t-2));
fd=(i1.*(t==-2)+(fd1.*((t>-2)&(t<-1)))+(i2.*(t==-1))+(fd2.*((t>1)&(t<0)))+(i3.*(t==0))+(fd3.*((t>0)&(t<1)))+(fd4.*((t>1)&(t<2)))+(i4.
*(t==2)));
subplot(3,1,2);
plot(t,fd,'c','Linewidth',1.5);
xlabel('t')
title('Primera derivada')
axis ([-7 6 -3 3])
grid on;
syms x
fft1=1+x;
Ff1=int(fft1,x)
fft2=2;
Ff2=int(fft2,x)
fft3=1;
Fft3=int(fft3,x)
fft4=3-2*x;
Fft4=int(fft4,x)

If1=t + (t.^2)/2;
If2=(2*t)+1.5;
If3=t+1.5;
If4=-t.^2 + 3*t+0.5;
If5=2.5;
If=(If1.*((t>=-2)&(t<-1))+If2.*(t>=1&(t<0))+If3.*(t>=0&(t<1))+If4.*(t>=1&(t<=2))+If5.*(t>2));
subplot(3,1,3);
plot(t,If,'g','LineWidth',2);
xlabel('t')
title(' Integral')
axis ([-7 6 -3 3])
grid on;

syms t;
fs1=-1;
fs2=-0.5;
fs3=0;
fs4=0.5;
fs5=1;
t=-10:1:10;

f=(fs1.*((t>=-4)&(t<=-2))+fs2.*(t==1)+fs3.*(t==0)+fs4.*(t==1)+fs5.*((t>=2)&(t<=3)));
subplot (4,1,1)
stem(t,f,'c','LineWidth',1.5);
xlabel('t')
title(' Funcion x[t]')
axis ([-7 7 -1.25 1.25])
grid on;
subplot (4,1,2)
af=(fs1.*((t+1>=-4)&(t+1<=-2))+fs2.*(t+1==1)+fs3.*(t+1==0)+fs4.*(t+1==1)+fs5.*((t+1>=2)&(t+1<=3)));
stem(t,af,'g','LineWidth',2.5);
xlabel('t')
title('Desplazamiento')
axis ([-7 7 -1.25 1.25])
grid on;
subplot (4,1,3)
af=(fs1.*((t+1>=-4)&(t+1<=-2))+fs2.*(t+1==1)+fs3.*(t+1==0)+fs4.*(t+1==1)+fs5.*((t+1>=2)&(t+1<=3)));
df=af-f;
stem(t,df,'b','LineWidth',1.5);
xlabel('t')
title(' Primera derivada ')
axis ([-7 7 -1.25 1.25])
grid on;
If1=-1;
If2=-2;
If3=-3;
If4=-3.5;
subplot (4,1,4)
If=(If1.*((t>=-4)&(t<-3))+If2.*((t>=-3)&(t<-2))+If3.*((t>=-2)&(t<1))+If4.*((t>=1)&(t<1))+If3.*((t>=1)&(t<2))+If2.*((t>=2)&(t<3))+If1.*(t==3));
stem(t,If,'r','LineWidth',2);
xlabel('t')
title(' Integral ')
axis ([-7 7 -4 1.25])
grid on;

También podría gustarte