Is it possible to call external matlab functions from a tlc file?

6 次查看(过去 30 天)
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
Titus Edelhofer 2012-9-6
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 个评论
Xenoepist
Xenoepist 2012-9-7
Well, the problem is that the function I'm going to be using is already made and it is very long and complicated. It is divided into smaller ".m" matlab functions. What I want to do is compile each ".m" function into a ".c" function and call each function from my "S-function."
The other problem that I have is that my professor won't even show me the ".m" functions until I've learned to call ".c" functions from the TLC.
The function that I used in the example is not the one I need to compile. It is just a simple one I made to understand more complicated ones.
Sameer
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by