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

 採用された回答

Image Analyst
Image Analyst 2012 年 7 月 13 日
編集済み: Image Analyst 2012 年 7 月 13 日

0 投票

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 件のコメント

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

サインインしてコメントする。

その他の回答 (1 件)

Andreas Goser
Andreas Goser 2012 年 7 月 13 日
編集済み: Andreas Goser 2012 年 7 月 13 日

0 投票

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...

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by