image example of a cost function created in MATLAB