[R] Query regarding linking R with Matlab

Henrik Bengtsson hb at stat.berkeley.edu
Wed Dec 27 09:26:06 CET 2006


Hi,

It might be that R can't find Matlab; then you have to specify option
'matlab', see help(Matlab).  Try also a different port. Try to add a
line setVerbose(matlab, -2) to get more detailed output what is going
on;

matlab <- Matlab(host="localhost", port=9998)
setVerbose(matlab, -2)
if (!open(matlab))
  throw("Matlab server is not running: waited 30 seconds.")

If you can't get it to work, send the output of the above.

/Henrik

On 12/27/06, Bhanu Kalyan.K <kalyansikha at yahoo.com> wrote:
> Respected Sir,
>
> I thank you for your concern. I have worked with the code that you have
> provided. But it has generated errors like:
>
> > if (!open(matlab))
> +   throw("Matlab server is not running: waited 30 seconds.")
>  //This command is not responding even after 30 seconds.
>
> > res <- evaluate(matlab, "swissroll")
> Error in writeBin(con = con, as.integer(b), size = 1) :
>         invalid connection
>
> > vars <- getVariable(matlab, c("Y", "X", "K", "d"))
> Error in writeBin(con = con, as.integer(b), size = 1) :
>         invalid connection
> Kindly help me with this.
>
> Regards
> Bhanu Kalyan K
>
>
> Bhanu Kalyan K
> BTech CSE Final Year
> reach4kalyan at gmail.com
> Tel :+91-9885238228
>
>  __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com



More information about the R-help mailing list