For anyone who gets stuck on this problem, or who wants more practice with function handles, I've created a few more similar problems: http://www.mathworks.com/matlabcentral/cody/problems/581-function-composition, http://www.mathworks.com/matlabcentral/cody/problems/582-function-composition-harder, http://www.mathworks.com/matlabcentral/cody/problems/583-implement-a-counter