Calling matlab functions from a C code
이전 댓글 표시
I have a program written in C. I would to know if it is possible to call, from my C code, all matlab functions which are in 'Adaptive Regression Splines toolbox for Matlab/Octave' and in 'Neural Network Toolbox'. Have you some examples to send to me ? Thank you.
답변 (1개)
James Tursa
2011년 9월 8일
0 개 추천
See the External Interfaces section of the doc, and in particular the mexCallMATLAB function.
댓글 수: 2
Stephane Krau
2011년 9월 8일
James Tursa
2011년 9월 8일
Depends. There is additional overhead in mexCallMATLAB vs calling the same function from an m-file, but the function itself runs just as fast. If you are calling the function using an Engine application instead of the mex formulation, then there is additional overhead in copying the variables between your C code and the MATLAB Engine. But all of this may be in the noise compared to rewriting the MATLAB functions yourself in C. It all depends on what you are doing.
카테고리
도움말 센터 및 File Exchange에서 Call C/C++ from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!