File mttroot/mtt/bin/trans/m/mtt_update.m artifact 27453a1721 part of check-in 74be221092


function [x] = mtt_update(dx,x,dt,STEPFACTOR,METHOD,name);

  if (METHOD==1)		#Euler
    ddt = dt/STEPFACTOR;
    x = x + dx*ddt;
  elseif (METHOD==2)		#Linear implicit or Implicit
    eval("[AA,AAx] = ",name,"_smx;");
    x = AA\(AAx + dx*dt);
  else
    error("Method %i is not defined", METHOD);
  endif;

endfunction;


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]