Prev: ??? Error using ==> fzero at 334 Function value at starting guess must be finite and real.
Next: Referencing stateflow lib inside another stateflow?
From: Ehud Eilon on 18 Mar 2010 09:40 Hello, My function use a rmdir that refuses to be executed. Let the relevant directory (defined in absolute path, not relative path) be called here x. Than the syntax is: rmdir('x','s') yields error message 'directory x doesn't exist!' and yet, isdir('x') yields logical true (1); and when I repeat the same syntax (copy paste) from the debugger line matlab executes without objections. Have anyone seen this kind of problem before? Thanks, Udi
From: news.mathworks.com on 18 Mar 2010 10:08 Do a "rehash toolboxcache" on the matlab command line to update the directory structure. "Ehud Eilon" <ehudeilon(a)gmail.com> wrote in message news:hntafp$nu4$1(a)fred.mathworks.com... > Hello, > > My function use a rmdir that refuses to be executed. Let the relevant > directory (defined in absolute path, not relative path) be called here x. > Than the syntax is: > > rmdir('x','s') > > yields error message 'directory x doesn't exist!' > > and yet, isdir('x') yields logical true (1); and when I repeat the same > syntax (copy paste) from the debugger line matlab executes without > objections. > > Have anyone seen this kind of problem before? > > Thanks, > Udi
From: Ehud Eilon on 18 Mar 2010 11:16 Thanks for the quick answer, but I need to find a solution inside my function, while it's still running. When I'm at the command line it's already too late. And no, adding "rehash toolboxcache" to the function before the rmdir line doesn't help, as well as adding "rehash" or "pause(1)" :( "news.mathworks.com" <murat.belge(a)mathworks.com> wrote in message <hntc42$mu2$1(a)fred.mathworks.com>... > Do a "rehash toolboxcache" on the matlab command line to update the > directory structure. > > "Ehud Eilon" <ehudeilon(a)gmail.com> wrote in message > news:hntafp$nu4$1(a)fred.mathworks.com... > > Hello, > > > > My function use a rmdir that refuses to be executed. Let the relevant > > directory (defined in absolute path, not relative path) be called here x. > > Than the syntax is: > > > > rmdir('x','s') > > > > yields error message 'directory x doesn't exist!' > > > > and yet, isdir('x') yields logical true (1); and when I repeat the same > > syntax (copy paste) from the debugger line matlab executes without > > objections. > > > > Have anyone seen this kind of problem before? > > > > Thanks, > > Udi >
From: Ashish Uthama on 18 Mar 2010 11:44 On Thu, 18 Mar 2010 09:40:09 -0400, Ehud Eilon <ehudeilon(a)gmail.com> wrote: > Hello, > > My function use a rmdir that refuses to be executed. Let the relevant > directory (defined in absolute path, not relative path) be called here > x. Than the syntax is: > > rmdir('x','s') > > yields error message 'directory x doesn't exist!' > > and yet, isdir('x') yields logical true (1); and when I repeat the same > syntax (copy paste) from the debugger line matlab executes without > objections. > > Have anyone seen this kind of problem before? > > Thanks, > Udi Is this a local directory? Are you creating it? There might be filesystem delays causing this behavior. When did you run the isdir('x')? [Protect your rmdir with a if(isdir(..)) in the function code. ]
From: us on 18 Mar 2010 12:02
"Ehud Eilon" <ehudeilon(a)gmail.com> wrote in message <hntafp$nu4$1(a)fred.mathworks.com>... > Hello, > > My function use a rmdir that refuses to be executed. > Let the relevant directory (defined in absolute path, not relative path) be called here x. Than the syntax is: > > rmdir('x','s') > > yields error message 'directory x doesn't exist!' > > and yet, isdir('x') yields logical true (1); and when I repeat the same syntax (copy paste) from the debugger line matlab executes without objections. > > Have anyone seen this kind of problem before? > > Thanks, > Udi is your X local or remote(?)... us |