Using process in c# to run multiple matlab scripts -


so have matlab script initializes values , want run matlab script. there way tell process run script after first one.

here's code, works fine runs 1 script.

processstartinfo info = new processstartinfo(@"matlab.exe", @"-r script1"); process process = new process(); process.startinfo = info; process.enableraisingevents = true;               process.start(); process.waitforexit(); process.exited += new eventhandler(myprocess_exited); evhandledgetlatest = process.hasexited; 

how can after script1 run script2? want run script1 , script2 in same process, script2 needs have values (in matlab workspace) created script1.

if i'd consider calling matlab script directly c#. approach allow results script1 , pass them script2.

you'll need add reference matlab com object.

for full details see: http://www.mathworks.com/help/matlab/matlab_external/call-matlab-function-from-c-client.html


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -