Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • 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
Joined
Oct 28, 2005
Messages
1
Location
UA
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

Back
Top