フィルターのクリア

Solving an equation in Matlab

4 ビュー (過去 30 日間)
Pablo Estuardo
Pablo Estuardo 2020 年 2 月 12 日
コメント済み: Star Strider 2020 年 2 月 13 日
Dear, I'm trying to resolve this equation for my thesis project, u and v are the values that I try to calculate, the only parameter that change is the Tx and Ty, all the other parameters are constant. I appreciate any help
Screen Shot 2020-02-12 at 1.08.04 PM.png
tx = [0.1 0.5 0.12 0.14 0.22 0.1 0.12 0.29]
ty = [0.4 0.12 0.34 0.14 0.13 0.03 0.2 0.13]
Omega = 7.3E-5;
latitude = -12;
f0 = 2*Omega*sind(latitude);
r = 1./(2.*24.*3600)
Hm = 25
rho = 1.025e3
dvdt0 = -r.*v0 - f0.*u0 -ty./(rho.*Hm);
dudt0 = -r.*u0 + f0.*v0 + tx./(rho.*Hm);

採用された回答

Star Strider
Star Strider 2020 年 2 月 12 日
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.
  10 件のコメント
Pablo Estuardo
Pablo Estuardo 2020 年 2 月 13 日
編集済み: Pablo Estuardo 2020 年 2 月 13 日
Thanks Star, you helping me a lot, now im going to try to make the dsolve works, in that way I can add more terms to try new solutions, again, thanks you so much for your time... best regards.
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 == tauy/(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)
Star Strider
Star Strider 2020 年 2 月 13 日
As always, my pleasure!
I will help as I can.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumbers and Precision についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by