Skip to content
Prev 106676 / 398525 Next

Query regarding linking R with Matlab

[Forwarding to r-help for completeness. /Henrik]

---------- Forwarded message ----------
From: Henrik Bengtsson <hb at stat.berkeley.edu>
Date: Dec 28, 2006 9:45 PM
Subject: Re: [R] Query regarding linking R with Matlab
To: kalyansikha at yahoo.com


Hi.
On 12/28/06, Bhanu Kalyan.K <kalyansikha at yahoo.com> wrote:
The return value of evaluate() is NULL when successful (I noticed the
help is saying '0'; I've corrected that for the next version).
Anyway, 'res' contains nothing of interest.  If there is any error on
the Matlab side, an error is thrown in R giving you the details.

What you might want to do is:

data <- getVariable(matlab, "A")
str(data)
Yes, the server script is shut down, but Matlab is left running on
purpose so you have a chance to continue working with the Matlab
session by hand.
That everything is now working as expected.  See the example of
help(Matlab) to get more ideas how to interact with Matlab from R.

Cheers

Henrik
Message-ID: <59d7961d0612280308v37cff21ep56cb4cd30eec3620@mail.gmail.com>
In-Reply-To: <59d7961d0612280245r4c172d71xf6232f6a61504d61@mail.gmail.com>