I have Matlab Scripts (.m) files that take data written into .txt files by VC++, graphs them, and saves them as .jpgs.
I would like to be able to call these functions from VC++ after I write all the relevant data so I don't have to explicitly open MATLAB and run these scripts manually.
I've looked some documentation on Google about how to do this, but they all deal with function calls. How can I call a script that takes no input and produces no output (besides the graphs)?
Also, I'm not really sure how to set up this interface in the first place. Can anyone provide a step by step guide for dummies?
I have in the past turned Matlab functions (not scripts, but fnuctions, but it's trivial to turn a MatLab script into a function) into C code with the MatLab provided MatLab to C compiler.
I suggest you take your script and turn it into a function. If it takes no input and returns nothing, it will have C prototype of the form