Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Persistent data structures inside of M-file S-function

Status
Not open for further replies.

osnwt

Electrical
Oct 28, 2005
1
Is there any way to allocate an arbitrary data structures (such as buffers, structures, etc) inside of an M-file S-function and save references to them using some kind of PWork vectors?

I know it is simple in C language, but we need to use a number of complex data structures in M-file S-function. I am sure it is not possible using Level-1 S-function. What about Level-2?

It is not convenient to use global variables (do they survive between simulation steps?) or to pack all data into usual real state vectors.

Any suggesstions?
Thank you in advance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor