MATLAB Answers


engOpenSingleUse returns a retstatus of -3 and doesn't start the MatLab engine.

Asked by Renee
on 13 Feb 2013

I'm calling engOpenSingleUse and it's returning a retstatus of -3 and doesn't start the MatLab engine.

I haven't been able to find out what a retstatus -3 means and why that isn't letting me open the engine.

	int retstatus = 0;
	if (g_Plotting)
		l_MLEngine  = engOpenSingleUse(NULL, NULL, &retstatus);
	if (retstatus != 0) 

I'm using MatLab 2012b with the mapping toolbox and this same code snippet works on other machines running MatLab 2011 and 2008 with the corresponding toolbox.



No products are associated with this question.

1 Answer

Answer by Renee
on 15 Feb 2013
 Accepted answer

If anyone is looking for the retstatus error codes they are:

0 = success -2 = error - second argument must be NULL -3 = error - engOpenSingleUse failed

Additional Info can be found:

To ultimately fix my engOpenSingleUse problem I had to run a command prompt as an administrator and type the command: matlab /regserver

This now lets me run my code and successfully opens the engine. (At least in debug mode!)


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!