Functional Programming in Matlab