Matlab engine - C++ doesn't call matlab function written by myself
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ruiqi Zhao
el 27 de Dic. de 2013
Comentada: Ruiqi Zhao
el 30 de Dic. de 2013
I try to call a matlab function in C++. The matlab function is written by myself. But it seems that C++ doesn't call this function at all. I have successfully run "engwindemo.c". I also do a modification to "engwindemo.c" to make it call a simple function written by myself. It also doesn't work. I am thinking that maybe the function is not put in the right folder. What's the path that I should put my matlab function? Or are there other causes? Thanks for help!
0 comentarios
Respuesta aceptada
James Tursa
el 27 de Dic. de 2013
Editada: James Tursa
el 27 de Dic. de 2013
The Engine starts up with the default folder, so if your function is not on the path at start up then the Engine will not see it. You will need to send some "cd" or "path" commands to the Engine first to make the function visible (or maybe have these in a startup.m file that the Engine executes).
5 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Call MATLAB from C en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!