% ex1quiv,  y'=sin(ty), y(0)=6 med Eulers metod
  clear, clf
  tslut=20; 
  h=0.2; 
  t0=0;  z0=0; ztop=6.5;      
  x=t0:h:tslut; z=z0:h:ztop;
  [X,Z]=meshgrid(x,z); 
  DZ=sin(X.*Z);  DX=ones(size(DZ));
  quiver(X,Z,DX,DZ)
  axis([t0 tslut  z0  ztop]), hold on
% Eulers metod från t=0 till tslut
  h=0.2; t=0; y=6;  T=t; Y=y; 
  while t<tslut-h/2
    f=sin(t*y); 
    y=y+h*f;  t=t+h;  T=[T; t]; Y=[Y; y]; 
  end
  plot(T,Y,'g')
  h=0.1; t=0; y=6;  T=t; Y=y;    % Euler med halverat steg
  while t<tslut-h/2
    f=sin(t*y); 
    y=y+h*f;  t=t+h;  T=[T; t]; Y=[Y; y]; 
  end
  plot(T,Y,'r')


