X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 16 Sep 2019 03:09 PM by  Ben Castellani
SPAWN Function
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

David House



New Member


Posts:
New Member


--
05 Sep 2019 02:39 PM
    I am trying to call a MATLAB .exe from IDL and pass it inputs. I thought maybe the SPAWN command is what I should use but I cant seem to pass in any variables to the .exe. Is this not a thing? How can you run a matlab program from IDL?

    Dave

    Ben Castellani



    Basic Member


    Posts:130
    Basic Member


    --
    16 Sep 2019 03:09 PM
    There is no "bridge" functionality between IDL and Matlab, unfortunately.

    If you want launch Matlab from within IDL, use SPAWN and call "matlab.exe". The command line options available for that should be documented somewhere by MathWorks.
    You cannot directly pass IDL variables into Matlab as they are separate processes and do not share the same memory space. The simplest (and probably best) option for this is to write the IDL variables to a file, then read in the file within your Matlab code.
    You are not authorized to post a reply.