Skip to content
Prev 106751 / 398513 Next

Evaluating Entire Matlab code at a time

This is very odd, but maybe 'cd' is not a command on your Windows
Matlab installation.  I tried the same code on a Unix installation (I
don't have access to Matlab for Windows but others have been using
R.matlab there successfully).  Find out what the command for getting
the current directory in your Matlab version is and use that instead.

You could also troubleshoot by this:

1. Start Matlab using Matlab$startServer(minimize=FALSE)
2. Setup the Matlab connection from R and close it with close(matlab).
3. Go to the Matlab windows and try the commands that failed for you
    when called from R. This will give you a hint.

Remember, there is nothing magic going on.  Think about the R Matlab
connection as R is typing the Matlab commands for you; anything you
can do in that Matlab windows which you did close(matlab) on you can
do with evaluate(matlab, ...) - before closing it that is.

/Henrik
On 12/30/06, Bhanu Kalyan.K <kalyansikha at yahoo.com> wrote: