Is it possible to call external matlab functions from a tlc file?
이전 댓글 표시
I have a Level-2 Matlab S-function that calls a great number of other matlab functions in order to perform a routine. It is a lot of code and I wonder if is possible to do a wrapper for a level-2 matlab function or if is possible to call those functions (the ones originally called from my Level 2 S function) from the TCL file. I know this is possible with C Sfunctions, but I have not find anything about doing it with matlab.|
답변 (1개)
Titus Edelhofer
2012년 9월 6일
2 개 추천
Hi,
no, this is not possible. It would not make too much sense anyway: you need the .tlc file for code generation, but you would need to convert the MATLAB code called by your S-Function into C code in some way ...? Depending on your release you could use an Embedded MATLAB Function block or MATLAB Coder to fulfill the task ...
Titus
댓글 수: 7
Titus Edelhofer
2012년 9월 6일
One point missing: in tlc you can evaluate MATLAB functions to support the process of code generation, see for "FEVAL" in the Target Language Compiler, section "TLC Build-In Functions". But in the generated code you can't use a MATLAB expression, because the output of tlc is C, not MATLAB.
Xenoepist
2012년 9월 7일
Titus Edelhofer
2012년 9월 7일
I'm coming back to the last part of my answer: have you thought about using the MATLAB Function Block? The code in there get's compiled to C-code without the need to write a .tlc file ...
Xenoepist
2012년 9월 7일
Sameer
2014년 10월 9일
Hi
Did you managed to solve the issue??
If yes then please guide as I am having the same trouble.
Regards
카테고리
도움말 센터 및 File Exchange에서 Target Language Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!