function phi = fcn(psi,u,v,w,r,u_v_dot,v_v_dot,w_v_dot,r_v_dot)

% phi = [-u_v_dot -v*r 0 0 -abs(u)*u 0 0 0 0 0 0 cos(psi) -sin(psi) 0;
%        u*r -v_v_dot 0 0 0 -abs(v)*v 0 0 0 0 0 sin(psi) cos(psi) 0;
%        0 0 -w_v_dot 0 0 0 -abs(w)*w 0 0 0 -1 0 0 -1;
%        -u*r u*v 0 -r_v_dot 0 0 0 -abs(r)*r 0 0 0 0 0 0];
   
phi = [u_v_dot 0 0 0 -abs(u)*u 0 0 0 0 0 0 cos(psi) -sin(psi) 0;
       0 v_v_dot 0 0 0 -abs(v)*v 0 0 0 0 0 sin(psi) cos(psi) 0;
       0 0 w_v_dot 0 0 0 -abs(w)*w 0 0 0 1 0 0 1;
       0 0 0 r_v_dot 0 0 0 -abs(r)*r 0 0 0 0 0 0];
   
              
% phi = [u_v_dot -v*r 0 -abs(u)*u 0 0 0 0 0 0 0 0 0;
%        u*r v_v_dot 0 0 0 -abs(v)*v 0 0 0 0 0 0 0;
%        0 0 0 0 0 0 w_v_dot 0 -abs(w)*w -1 0 0 0;
%        -u*r u*v 0 0 0 0 0 0 0 0 r_v_dot 0 -abs(r)*r];
   
% phi = [0 0 0 0 0 0 0 0 0 0 0 cos(psi) -sin(psi) 0;
%        0 0 0 0 0 0 0 0 0 0 0 sin(psi) cos(psi) 0;
%        0 0 0 0 0 0 0 0 0 0 1 0 0 1;
%        0 0 0 0 0 0 0 0 0 0 0 0 0 0];