Two Variable Function Solver Matlab