View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

5.0 | 1 rating Rate this file 7 Downloads (last 30 days) File Size: 228 KB File ID: #24359 Version: 1.0



Qun HAN (view profile)


Faster version of the MATLAB function bvp4c.

| Watch this File

File Information

The most time consuming part of BVP4C is the function colloc_Jac, especially when the number of equations is large. In bvp4c2 the inefficient sparse matrix operation in colloc_Jac is optimized according to the method intruduced in Loren's blog ( When called without unknown parameters and FJacobian is not used, bvp4c2 is more than 10x faster than BVP4C for large BVP systems.

The mex file SPARSE2.MEXW32 is compiled from SuiteSparse( It is about 2x faster than SPARSE. If you encounters problem with it, just comment it out in bvp4c2 and use the MATLAB function sparse.

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
29 Jul 2016 mincong he


16 Nov 2015 Qun HAN

Qun HAN (view profile)

You do not need this function after MATLAB R2014

Comment only
04 Jul 2013 Qun HAN

Qun HAN (view profile)

MATLAB R2012 and higher versions do not need this code, because the bvp4c.m distributed with the software has already implemented such optimizaion.

Comment only
12 Jun 2009 Qun HAN

Qun HAN (view profile)

For a benchmark see:[5].png

Comment only
08 Jun 2009 Qun HAN

Qun HAN (view profile)

Unzip to MATLABROOT\toolbox\matlab\funfun

Comment only

Contact us