Calling Matlab from c++ program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sree12
    New Member
    • Nov 2007
    • 3

    Calling Matlab from c++ program

    Hi,

    Can anyone of u help me to call Matlab functions from c++ program.

    I need to write a c++ program and from this, i need to carry out a few calculations and need to plot the graphs. I have Matlab Component Runtime. Will it enough? or need any other to do the above things.

    Thanks in advance........ ...
  • sanctus
    New Member
    • Mar 2007
    • 84

    #2
    Originally posted by sree12
    Hi,

    Can anyone of u help me to call Matlab functions from c++ program.

    I need to write a c++ program and from this, i need to carry out a few calculations and need to plot the graphs. I have Matlab Component Runtime. Will it enough? or need any other to do the above things.

    Thanks in advance........ ...
    Wouldn't it be easier to write a Matlab program and then call a subroutine in C++ for the calculations (they are quicker in C) and then plot in Matlab?

    For understanding on how to do this try to search for example mexfunction in the matlab help.

    Comment

    • sanctus
      New Member
      • Mar 2007
      • 84

      #3
      Actually I just saw now that you can call as well from C Matlab, for this search for mexCallMATLAB in the Matlab help (shortcut F1)

      Comment

      Working...