フィルターのクリア

Use MATLAB Editor to create a Linearizing Program

2 ビュー (過去 30 日間)
Jack Glendenning
Jack Glendenning 2016 年 5 月 4 日
コメント済み: Bhavesh 2016 年 5 月 11 日
Have to Linearize the following ODE using MATLAB Editor:
13y''+0.27y'-0.35/y +3.5=1.2753
y(0)=0
y'(0)=0 for 0<= t <=5

採用された回答

Bhavesh
Bhavesh 2016 年 5 月 9 日
編集済み: Bhavesh 2016 年 5 月 9 日
For a 2nd order differential equation of the form - y'' + p(t) y' + q(t)y = g(t) with initial conditions - y(to) = yo and y'(to) = y1
We assign x1 = y; x2 = y0
Step 1) First convert 2nd order equation to an equivalent system of 1st order equations.
  • Let x1 = y and x2 = y'
Thus,
  • x1' = x2
  • x2' = -q(t)x1 - p(t)x2 + g(t)
Step 2) Create and save a .m file which will return a vector-valued function
function xp=eg1(t,x)
xp=zeros(2,1);
xp(1)=x(2);
xp(2)=(0.35/13)*x(1)-(0.27/13)*x(2)+(1.2753/13);
end
Step 3) Call the function by using the command -
[t,x]=ode45('eg1',[0,5],[0,0]);
  2 件のコメント
Jack Glendenning
Jack Glendenning 2016 年 5 月 11 日
I finally understand now. Thank-you very much Bhavesh! That was very helpful.
Bhavesh
Bhavesh 2016 年 5 月 11 日
It was my pleasure to help you and I am glad that the workaround resolved the issue.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFunction Creation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by