cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Need some help to solve differential equation with AdamsBDF solver

주봉_10843142
6-Contributor

Need some help to solve differential equation with AdamsBDF solver

Hello,

 

Currently I have been facing some errors to solve differential equations using AdamsBDF solver.

Your kind help or advice will be very much appreciated.

Please see the belwo images and attached file for equations and the problem with "D"_Red Circle.

 

_10843142_1-1706359609828.png

 

_10843142_2-1706359662374.png

 

Thank you.

 

 

ACCEPTED SOLUTION

Accepted Solutions

When you defined D(t,X) you type a square bracket for the second entry and so you created inadvertently a 1x1 matrix .

Simply use 'normal' parentheses and its works:

Werner_E_0-1706559266952.png

BTW, there is no need to use a solve block when you use one of the stand alone ODE solvers. A solve block is needed only when you use 'odesolve'.

 

You may get a smoother result if you either increase N significantly or use a smaller interval [Ti; Tf], or both:

Werner_E_1-1706559695337.png

 

 

View solution in original post

2 REPLIES 2

When you defined D(t,X) you type a square bracket for the second entry and so you created inadvertently a 1x1 matrix .

Simply use 'normal' parentheses and its works:

Werner_E_0-1706559266952.png

BTW, there is no need to use a solve block when you use one of the stand alone ODE solvers. A solve block is needed only when you use 'odesolve'.

 

You may get a smoother result if you either increase N significantly or use a smaller interval [Ti; Tf], or both:

Werner_E_1-1706559695337.png

 

 

Werner_E
25-Diamond I
(To:Werner_E)

In case you are interested, here is the system solved using a solve block with odesolve.

Werner_E_2-1706560240207.png

Prime 9 sheet attached

 

Announcements

Top Tags