comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Talking to Matlab
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Talking to Matlab [message #41339 is a reply to message #41127] Wed, 06 October 2004 07:11 Go to previous messageGo to previous message
p.sommer is currently offline  p.sommer
Messages: 20
Registered: April 2004
Junior Member
rcohen@raytheon.com (Rob) wrote in message news:<ac2cbce6.0409300812.3b62cd9f@posting.google.com>...
> I'm trying to get and set variables in Matlab from IDL. Using an older
> newsgroup posting of how to do this, I'm able to put an array created
> in IDL into Matlab and see it in Matlab's workspace, but I'm getting a
> "bad variable type" response from Matlab when I try to get the array
> back into IDL. Anyone see what my problem is in the code below? Or, if
> there's a better way to do
> this that would be valuable information as well. This is with IDL 6
> and
> Matlab 6.5 R13. Many thanks.
>
> IDL> oMatlab6=OBJ_NEW('IDLcomIDispatch$PROGID$Matlab_Application_ 6')
> IDL> data=DINDGEN(100)
> IDL> PLOT, data
> IDL> oMatlab6->PutFullMatrix,'fromidl','base',data,data
> IDL> oMatlab6->Execute,'plot(fromidl);'
> IDL> fromMat = oMatlab6->GetFullMatrix('fromidl','base',zreal,zimag)
> % IDLCOMIDISPATCH$PROGID$MATLAB_APPLICATION_6::GETFULLMATRIX: Unable
> to
> call method GETFULLMATRIX.
> Bad variable type.
> % Execution halted at: $MAIN$

Rob,

We *should* be able to figure something out for you. I'm fairly
certain the GetFullMatrix method returns a SAFEARRAY which is not
supported by the IDL 5.5 COM bridge - SAFEARRAY majority is the
opposite of IDL's storage.

I'd suggest we try using the MATLAB Engine which is a lower level C
API. Please contact me directly to discuss in more detail and then we
can share our findings with the group once we have tried a few things.

Thanks,
-Paul
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: DISPLAY environment on Mac OS-X
Next Topic: Projection Parameters in ENVI

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 15:01:08 PDT 2025

Total time taken to generate the page: 1.36052 seconds