Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

mex setup

Asked by Oyinda

Oyinda (view profile)

on 5 May 2011

so i try to run mex using: mex -setup but i keep getting this error...

\Common was unexpected at this time.??? Error using ==> mex Unable to complete successfully

pls how do i solve this problem?. p.s i am using MATLAB6p1



Oyinda (view profile)



No products are associated with this question.

1 Answer

Answer by Kaustubha Govind

Kaustubha Govind (view profile)

on 5 May 2011

From a preliminary web search, it seems like you may have special characters in your PATH environment variable, like & or (, that "mex -setup" was unable to handle in MATLAB 6.1 (R12.1). The issue was fixed in MATLAB 6.5 (R13) and later versions. Would it be possible for you to upgrade to the latest release (R2011a)? If not, you could temporarily remove all special characters from your PATH variable, restart MATLAB, run "mex -setup" and restore your PATH variable again. (I haven't tried this, so please take it with a grain of salt)


Kaustubha Govind

Kaustubha Govind (view profile)

Contact us