MATLAB automatic differentiation using source transformation