Date: Dec 10, 2012 1:04 PM
Subject: Re: eval - Error: Unexpected MATLAB operator
On 12/10/2012 11:56 AM, Joana wrote:
> I'm analyzing an old code where they recommend to use matlab 5!!
> this is what is written:
> [cfile,dir] = uigetfile(zid)
> eval(['cd' dir]);
> It gives me "Error: Unexpected MATLAB operator" could it be because
> something has changed in this current version?
No, it's because you didn't include a blank to separate the directory
from the command --
eval(['cd ' dir]);
But, you don't need the eval; just use the builtin ML cd command/function