I'm having trouble getting my script to execute using the COM api calling from Java. Here's a code snippet:
myMatlabInCom = new ActiveXComponent("Matlab.Application");
myMatlabInCom.invoke("Execute", new Variant("addpath('e:\matlabscripts');");
myMatlabInCom.invoke("Execute", new Variant("addpath('C:\mike\test');");
myMatlabInCom.invoke("Execute", new Variant("cd ('C:\mike\test');");
myMatlabInCom.invoke("Execute", new Variant("mikeWrapper;");
In c:\mike\test there is a mikeWrapper.m script file that has one function called mikeWrapper.
The function is never called. I can do the add path calls, cd and mikeWrapper call in Matlab but not from the COM interface.
Any idea what I might be doing wrong? Seems like this should be easy but I can't seem to get it to work.
Thanks, -Mike