Get parameter into c++ s-function

1 view (last 30 days)
Gurkenglas
Gurkenglas on 13 Sep 2015
Edited: Gurkenglas on 13 Sep 2015
Hi,
I am trying to get a paramter via the s-function paramters field into the s- function. This works, but I need to get the paramter globally, because I need to use the paramter in other c++ functions, that doesnt have acces to the Simstruct S. This means, the following does work in Matlab, but other c++ functions in the s-function doesnt know Simstruct:
#define some_param(S) ssGetSFcnParam(S,0)
I need the following without any reference to the Simstruct S, but it doesnt work:
#define some_param ssGetSFcnParam(S,0)
I just need the paramter, the value that is stored in this paramter, no pointers or other stuff. I hope this is explained good enough. What can I do now? Thanks.

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!