Error: Unexpected MATLAB expression.

I am unable to execute a file.I don't know what to do.It is very much important for me to execute the file.Whenever i try to execute it,command window displays "Error: Unexpected MATLAB expression." & a dialog box in the editor shows to run this file, you can either change the matlab current directory or add its directory to the MATLAB path. there are 4 options for chage directory , add to path, cancel, help.
Please help me how to execute this file.I am a newbie to MATLAB

 Respuesta aceptada

Image Analyst
Image Analyst el 13 de Jul. de 2012
Editada: Image Analyst el 13 de Jul. de 2012

0 votos

When it asks you, tell it to change directory. The problem is that the current directory (seen in the drop down list at the top middle of your screen) is not the folder where your m-file lives. It needs to be, so this question you are seeing is normal. Tell it to change the folder and you should be okay.

1 comentario

Andreas Goser
Andreas Goser el 13 de Jul. de 2012
You are certainly right with own MATLAB files. I was under the impression the user is unable execute built-in commands. Let's see.

Iniciar sesión para comentar.

Más respuestas (1)

Andreas Goser
Andreas Goser el 13 de Jul. de 2012
Editada: Andreas Goser el 13 de Jul. de 2012
If you can execture really simple stuff like
plot(1:10)
then your installation is probably corrupt and needs a re-install. If this persistens, please call installation support.
The community may be able to help you, but in my experience, re-install is the quickest way.
Whatever is wrong has to do with paths as MATLAB can't find the commands. But it looks that you would not even be able to execte commands like PATH, ADDPATH etc...

Categorías

Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by