function [fdx,fcross,fev,fevini]=pelotitaev()
  function dx=fdx(x,t,d)
    m=1;
    k=1e6;
    b=30;
    g=9.8;

    dx=x;
    dx(1)=x(2);
    dx(2)=-g-d*(b/m*x(2)+k/m*x(1))
  endfunction

  function fcr=fcross(x,t,d,ind)
    fcr=x(1);
  endfunction
  
  function dnew=fev(x,t,d,ind)
    dnew=1-d;
  endfunction

  function dnew=fevini(x,t)
    if x(1)>0 then 
      dnew=0;
    else
      dnew=1;
    end
  endfunction
  
endfunction

  
