% OCW Universidad de Cantabria
% Cálculo Simbólico y Numérico en Ecuaciones Diferenciales
% © Cursos 2001-2014,  M. Eugenia Pérez, UC
%
syms  x;
% 
f=sin(x)
% 
ezplot(f,[-18,18])
AXIS([-18 18 -5 5])%  
pause
%  
w2=subs(f,x,x-5*0.25);
w1=subs(f,x,x+5*0.25);
w=(w1+w2)/2;
ezplot(w,[-18,18])
AXIS([-18 18 -5 5])
pause
% 
w1=subs(f,x,x+5*1/2);
w2=subs(f,x,x-5*1/2);
w=(w1+w2)/2;
ezplot(w,[-18,18])
AXIS([-18 18 -5 5])
pause%  
w1=subs(f,x,x+5*0.65);
w2=subs(f,x,x-5*0.65);
w=(w1+w2)/2;
ezplot(w,[-18,18])
AXIS([-18 18 -5 5])
pause
%  
w1=subs(f,x,x+5*(2*pi+1)/10);
w2=subs(f,x,x-5*(2*pi+1)/10);
w=(w1+w2)/2;
ezplot(w,[-18,18])
AXIS([-18 18 -5 5])
pause
%  
w1=subs(f,x,x+5*0.9);
w2=subs(f,x,x-5*0.9);
w=(w1+w2)/2;
ezplot(w,[-18,18])
AXIS([-18 18 -5 5])
pause
% 
w1=subs(f,x,x+5);
w2=subs(f,x,x-5);
w=(w1+w2)/2;
ezplot(w,[-18,18])
AXIS([-18 18 -5 5])
pause
%  
w1=subs(f,x,x+5*1.3);
w2=subs(f,x,x-5*1.3);
w=(w1+w2)/2;
ezplot(w,[-18,18])
AXIS([-18 18 -5 5])
pause
%  
w1=subs(f,x,x+5*1.5);
w2=subs(f,x,x-5*1.5);
w=(w1+w2)/2;
ezplot(w,[-18,18])
AXIS([-18 18 -5 5])
pause
% 
w1=subs(f,x,x+5*1.8);
w2=subs(f,x,x-5*1.8);
w=(w1+w2)/2;
ezplot(w,[-18,18])
AXIS([-18 18 -5 5])
pause
% 
w1=subs(f,x,x+5*2);
w2=subs(f,x,x-5*2);
w=(w1+w2)/2;
ezplot(w,[-18,18])
AXIS([-18 18 -5 5])
pause
%  
w1=subs(f,x,x+5*3);
w2=subs(f,x,x-5*3);
w=(w1+w2)/2;
ezplot(w,[-18,18])
axis([-18 18 -5 5])
pause
%  
syms x t
solucion=(subs(f,x,x+5*t)+subs(f,x,x-5*t))/2;
ezsurf(solucion,[0,3],[-18,18])
