Does Matlab support the creation of COM components? Is that a scripting language?
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
Hi, I need to call Matlab from GenXPro software (in which we code with Java) to calculate something and return it to the original software. To do this the first condition is that the programming language (e.g. Matlab) support the creation of COM components which is the feature of many of scripting languages. So, I would be thankful to answer my questions in the subject; I search for that, but the answers are not consistent.
Many Thanks, Jamal
Respuestas (1)
Guillaume
el 4 de Sept. de 2015
0 votos
Matlab implements a COM server, so you can indeed control matlab from any software that supports instantiating COM components. it's actually well documented in the help.
However, as far as I know, Java does not natively allow you to interface with COM.
3 comentarios
Guillaume
el 4 de Sept. de 2015
var matlab = new ActiveXObject("Matlab.Application");
matlab.PutWorkspaceData("gxptTarget", "base", gxptTarget);
matlab.PutWorkspaceData("gxptOutput", "base", gxptOutput);
matlab.PutWorkspaceData("gxptParams", "base", gxptParams);
matlab.PutWorkspaceData("gxptModelInfo", "base", gxptModelInfo);
matlab.Execute("result = somefunc(gxptTarget, gxptOutput, gxptParams, gxptModelInfo);")
return matlab.GetWorkspaceData("result", "base");
Jamal
el 4 de Sept. de 2015
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!