function convergence=controlconvergence(J,tol_cm) %CONTROLCONVERGENCE - determine the convergence of control_core solution % % Usage: % converged=controlconvergence(J,tol_cm) convergence=false; if ~isnan(tol_cm) & J