title: How to use a variable as parameter of a s-function in simulink
body: <p><br/>
  I want specify some parameters of a s-functions using a variable and not using a constant inserted manually.<br/>
  I have tried to define global variables in matlab and using them as paramaters and it works fine.<br/>
  Anyway, i want that a variable computed in simulink is used as parameter of an other s-fuction. Is it possible? If so, how can i do it?<br/>
  One idea was to continue to use global constants in matlab e to update them from simulink but i'm not able to do it because the "to workspace" block transforms them in struct or array and i need a single value.</p>
  
  <p><strong>Edit:</strong>
  To update the variable in the global variable in the workspace is not useful because it seems that simulink read the values at the beginning</p>