solving system of ODE's

please i have this differential equation and i need it to be solved by runge-kutta "ODE 45" and i'm not good in matlab program the equation is y''-t+y=0 ,initial conditions: y(0)=2 ,y'(0)=0 and the step size "h" =0.1 find the y(5)??? the professor told us that we must use matlab and make something called M file but i don't know any thing about this can you help ? i need the answer as fast as possible

댓글 수: 4

Sean de Wolski
Sean de Wolski 2011년 5월 6일
I would ask your professor to teach you and assist you; it's their job not ours. On that note, ask a question here if it's specific, MATLAB related, and you've shown us what you've tried.
JAMAL ALBASHA
JAMAL ALBASHA 2011년 5월 6일
you know our course dose not have any thing related to matlab but he gave us this homework just to learn about matlab but i downloaded the matlab program and it is not some thing easy to learn how to use a program like that in 2 days and i need the answer in 2 days but thank you any way you were so helpful !
Jarrod Rivituso
Jarrod Rivituso 2011년 5월 6일
Perhaps this question would be better worded as "where can I find a good tutorial on using the ODE solvers in MATLAB?"
Jamal if you reword it that way you might get more responses.
I'm actually not sure of what the answer is, though I'll say that the ode solver doc does have an example:
http://www.mathworks.com/help/techdoc/ref/ode23.html
JAMAL ALBASHA
JAMAL ALBASHA 2011년 5월 6일
jarrod i'm sorry if my question was not clear
and i know that i should try to solve it by my self but i'm just in my second year and i didn't even had the c++ course so i'm a little bit confused from all of this subject excuse me and i'm sorry for my question

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

답변 (1개)

Matt Tearle
Matt Tearle 2011년 5월 6일

0 개 추천

Although I'd generally agree with Jarrod about using ode45 or similar, from the wording of the question, it sounds like your prof wants you to write an RK4 solver by hand. All the MATLAB solvers are variable stepsize methods, but your assignment specifies a fixed h = 0.1. In that case, you'll need to learn the basics of programming in MATLAB. Here's a useful resource for that.
You'll also find other useful suggestions here.

카테고리

질문:

2011년 5월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by