Workspace struct array input to Simulink M file S function
===

I would like my Simulink Level 2 S function to sequentially run a series of test cases. Each test case populates a struct containing multiple numerical arrays. 
I am currently trying to achieve the above in two steps:

* Step 1: generate test cases using a M file, save to Workspace as an array of structs
* Step 2: read the array of structs from the Workspace into my model, using a Level 2 M 
file S function to process the test cases.

Step 2 is problematic for me, in that I cannot figure out a way to get the S-function block to accept the array-of-structs variable from the Workspace as input. I want to try avoiding the simin method (another Stackoverflow discussion, [here][1]), because it seems to require representing the entire structure as a single data column, and I would like to keep the struct intact. Also tried using a Constant block with the struct array as the variable name, but that returns an 'Invalid setting for _blockname_ parameter Value' for the block.

Would appreciate any suggestions for getting this set up correctly. Also open to a different method of building the model, if absolutely necessary. Thanks!


  [1]: http://stackoverflow.com/questions/8329944/input-data-to-simulink-from-workspace