% despejando de ecuaciones finitas
clear all
clc
close all

deltat=0.0001;
m=100000;
x1=zeros(m,1);
x2=zeros(m,1);
n=1;
x1(1)=1;
x2(1)=0;

while n<=m-1
    x1(n+1)=x2(n).*deltat+x1(n);
    x2(n+1)=-x1(n).*deltat+x2(n);
    n=n+1;
end


figure(1)
plot(x2)
grid on

#figure(1, "visible", "off");
#plot(x1);
#print -deps "../media/seno.eps";

