Matlab Database > Ordinary Differential Equations > Runge-Kutta method of order 4

Matlab File(s)

Title: Runge-Kutta method of order 4
Author: Alain kapitho
Institution: University of Pretoria
Description: runge_kutta(a, b, N, alpha) approximates the solution of the IVP y' = f(t,y) with t in the interval [a; b] using the Runge-Kutta method of order 4. Due to the evaluations of the function f(t,y), it is required from the user to enter the function that relates to the specific rpoblem at hand. This done at the end of the function runge_kutta4(). The inputs to this function are the endpoints a and b, the number N of subintervals we wish to subdivide the interval into, and the initial condition alpha. In cases you are required to stick to a specific step size h, then N = (b-a)/h. The outputs are two columns displaying t and w, the approximate solution at the given t
Keywords: Initial-value problem, Runge-Kutta method, RK4
File Name: runge_kutta4.m
File Size: 2 KB
File Version: 1.0
Matlab Version: 7.0 (R14)
Date: 2006-01-11
Downloads: 30969
Download File

Upload your own files today! Click here for more information.