I am trying to call and debug matlab code via C/C++. i am able to run the engdemo.c program but I cannot stop the debugger in a test MatLab file to see if this can be done. I would like the C/C++ program to spawn the MatLab environment so that I may have access to all the MatLab debugging tools but be able to read any inputs from the C/C++ calling function and return any modifications to those values back to the C/C++ function as well. I am running MatLab 6.5.1.199709 v 13. Does MatLab 7 have any added capability that I would need to do this?
Reginald Robertson wrote: > > > I am trying to call and debug matlab code via C/C++. i am able to > run > the engdemo.c program but I cannot stop the debugger in a test > MatLab > file to see if this can be done. > > I would like the C/C++ program to spawn the MatLab environment so > that I may have access to all the MatLab debugging tools but be > able > to read any inputs from the C/C++ calling function and return any > modifications to those values back to the C/C++ function as well. > > I am running MatLab 6.5.1.199709 v 13. Does MatLab 7 have any added > capability that I would need to do this? Look at Johnathan de Halleux's CMatlabEngine class
Michael Robbins wrote: > > > Reginald Robertson wrote: >> >> >> I am trying to call and debug matlab code via C/C++. i am able to >> run >> the engdemo.c program but I cannot stop the debugger in a test >> MatLab >> file to see if this can be done. >> >> I would like the C/C++ program to spawn the MatLab environment so >> that I may have access to all the MatLab debugging tools but be >> able >> to read any inputs from the C/C++ calling function and return any >> modifications to those values back to the C/C++ function as well. >> >> I am running MatLab 6.5.1.199709 v 13. Does MatLab 7 have any > added >> capability that I would need to do this? > > Look at Johnathan de Halleux's CMatlabEngine class I made some progress, however when i attempt to set a breakpoint in the Matlab code, i lose all keyboard control. I am able to see the green arrow at the first line of the Matlab code but i can't step. In the Matlab console that was created i lose control after I type a single command i.e. dbstep. If i don't set a breakpoint in the code, Matlab code executes properly and i have control both before and after it executes. Any clues? thx in advance