Writing an rk3 algorithm to solve IVP of the form y' = Ay + b(x)

Hi, as a piece of homework i've been given the problem of implementing an rk3 algorithm of the form [x, y] = MyRK3(A,bvector, y0, interval, N)to solve an ivp of the form y' = Ay + b(x) where the function handle bvector, should take the form b = bvector(x) where the input is the location x (which may vary inside the RK step), and the output is the vector b that is needed, together with the matrix A =A to define the system y' = Ay + b(x)
And basically i am really struggling with the function b = bvector(x), and have no idea where to start so could someone please point me in the right direction as to how to go about this?
many thanks, Tristan

Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Asked:

on 22 Nov 2011

Community Treasure Hunt

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

Start Hunting!