f



C/C++ and MatLab

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?
0
10/26/2004 6:35:47 PM
comp.soft-sys.matlab 211265 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

2 Replies
750 Views

Similar Articles

[PageSpeed] 24

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
0
10/26/2004 6:56:36 PM
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
0
rr80 (1)
10/26/2004 10:45:01 PM
Reply: