These have analytic solutions:
syms u(t) v(t) f taux tauy Hm rho R u0 v0
du = diff(u);
dv = diff(v);
DE = [du - f*v == taux/(Hm*rho) - R*u; dv - f*u == taux/(Hm*rho) - R*v]
Soln = dsolve(DE, u(0)==u0, v(0)==v0)
u_Soln = Soln.u;
v_Soln = Soln.v;
u_Soln = simplify(u_Soln, 'Steps',500)
v_Soln = simplify(v_Soln, 'Steps',500)
u_fcn = matlabFunction(u_Soln)
v_fcn = matlabFunction(v_Soln)
Note that ‘u_fcn’ and ‘v_fcn’ are anonymous functions you can use outside of the Symbolic Math Toolbox.
Best Answer