A generic dynamic programming Matlab function
Control of hybrid-electric vehicles