coefficients of differential equation defined by strings

조회 수: 1 (최근 30일)
F R
F R 2018년 4월 30일
편집: F R 2018년 4월 30일
I have a differential equation as string like
a*x1''[t] + b*cos(x2[t])*x1''[t] - n*x2'[t]*x1'[t]*sin(x2[t])-
c*(x2'[t])^2*sin(x2[t]) + g*cos(x1[t]) = In
and I want to extract the coefficients of
x1''[t], x1'[t], x2'[t]
and also extract the rest (which does not include any of these variables) as another term.
Is there a way to do it?
  댓글 수: 4
Walter Roberson
Walter Roberson 2018년 4월 30일
How do you want to handle the fact that you have x2'[t]^2 ? Do you want the coefficients for each power of each derivative ?
Analysis that needs to be able to handle (expression)^power and properly extract the coefficients of the variables by expansion, is not so easy to handle properly. Can we assume that the symbolic toolbox is present?
F R
F R 2018년 4월 30일
편집: F R 2018년 4월 30일
I want to extract the coefficient of x2'[t], so it should return
-c*x2'[t]*sin(x2[t])
yes, any toolbox which can handle this in Matlab is appreciated

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by