You can simply add additional parameters to the main function as follows:
function [sys,x0,str,ts] = mycsfunc(t,x,u,flag,P,K)
and use these within the function and/or pass them onto to mdlInitializeSizes, mdlOutputs, etc.
On the S-function block, enter values for P and K (in that order) in the "S-function parameter" edit-box. These values can be constant numbers or mask/workspace variables, just like for other block parameters.
Also, note that you are using Level-1 S-functions which have been deprecated for several years and have a lot of limitations. I would recommend that you convert to Level-2 S-functions if possible.
0 Comments
Sign in to comment.