call function from external class in Matlab S-function
이전 댓글 표시
Hello, I want to use matlab function defined in a 3rd party class. Currently I am using interpreted matlab function to call the function from this class. But now I want to shift this code to m-file s-function.
So basically I want to create an instance of this class. The class has connect() function which needs to be called only once. And the class has getFrame() function which needs to be called every iteration. I want use this instance to be created once and then call the connect function only once. Later on I need to call getFrame() function every iteration using the same instance.
For this I have to create the object and set the connection on "function setup(block)", update data on "function Update(block)" and close the connection on "function Terminate(block)" but to do this I need to share the "instance" between these function.
Thanks in advance for your help!
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Create MATLAB S-Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!