A Generic Dynamic Programming Matlab Function Plot