Execute an instance of Matlab using C# for all versions -
i wrote small c# program creates matlab instance , launches .m script.
using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; namespace matlab_app { class program { static void main(string[] args) { mlapp.mlapp matlab = new mlapp.mlapp(); matlab.execute("cd('"+ system.io.directory.getcurrentdirectory() + "\\mlab\\optimization')"); matlab.execute("main"); } } }
the program runs on computer used in compilation. if run on different computer, error on console. (yes files in exact directory supposed be). there can in order make program usable on other computers (with different windows/matlab versions) ?
Comments
Post a Comment