@edge6768, Thank you for your response. Would you please be more specific? Because I am trying to do that but I don't know how to call a MATlab user-defined function into VC++ environment?
The first link I provided follows an example downloaded with MATlab. According to that, it can be found here:
The program engdemo.c, in the matlabroot/extern/examples/eng_mat folder, illustrates how to call the engine functions from a standalone C program. For the Microsoft® Windows® version of this program, see engwindemo.c.
Obviously, you will need to see engwindemo.c since you're on Windows.
The second link details the functions provided in engine.h.
It looks like you will need to #include "<full file path>/engine.h" then create an Engine object which acts like a MATlab interpreter. You then use the functions from the second link to send it commands.