MATLAB Answers

How to get the ceofficients of a expression derived by ODE or integral ? For exampli,C1 and C2 in u

1 ビュー (過去 30 日間)
Guoyao.Li
Guoyao.Li 2021 年 8 月 25 日
編集済み: Guoyao.Li 2021 年 8 月 26 日
syms rho a b E omega u(r) mu
sigma_r=E/(1-mu^2)*(diff(u,r)+mu*u/r);
sigma_theta=E/(1-mu^2)*(mu*diff(u,r)+u/r);
u=dsolve(diff(r*sigma_r,r,1)-sigma_theta+rho*omega^2*r^2==0)
u = 

回答 (1 件)

James Tursa
James Tursa 2021 年 8 月 25 日
Typically these would be obtained by combining the solution with initial values for u. Do you have initial values?
  1 件のコメント
Guoyao.Li
Guoyao.Li 2021 年 8 月 26 日
Thanks!!!
I know that the specific solution for u needs initial conditions,but I want to extract the ceofficients of general solution,which are C1 and C2.And then using ''subs'' in MATLAB to subsitute C1 and C2 with specific value.However,it fails if I directly use syntax "u=subs(u,[C1 C2],[1 2])".
I have tried to use "children" syntax in MATLAB to extract C1 and C2 in u and it succeeds, but I think it's a little tedious.Is there any simple way to do it?

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

Community Treasure Hunt

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

Start Hunting!

Translated by