how to perform simulation in matlab from c++ code
Show older comments
I am writing a code for A* algorithm for path planning in c++. My question is how can i use this code in Matlab, or call from Matlab because later I want to perform the simulation in Matlab. I have read about the c-mex and currently working on it. just the matter of fact i/m still vague about the process of writing the c-mex file. Another thing is I've came across something called as S-function. I know that this function is used in simulink to perform the simulation and how actually all these things relate.
What is on my mind to carry on the project is like this: 1. first after i created the c++ code i need to modify the main() into mex gateway. 2. then i compiled the mex file and call it from matlab command. 3. then i need to do the simulation. how to perform the simulation? is it using s-function or is there other way to do that?
sorry, english isn't my primary language and i have some difficulties in deciphering english text especially the technical one.
thank you in advanced.
Accepted Answer
More Answers (0)
Categories
Find more on Use Prebuilt MATLAB Interface to C++ Library in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!