control simulink from M-file

后端 未结 3 2063
清酒与你
清酒与你 2021-01-07 06:22

I am trying to control a simulink from a M-file. What I want to do in the M-file is give the simulink model some input, run the simulink model, change one input value at 0.6

3条回答
  •  余生分开走
    2021-01-07 06:52

    This is not currently possible from an M-file. If you want to dynamically change the input at a given time externally, it will require an S-Function. Even this solution is difficult and wrought with flakey-ness since the Mathworks does not want to support this functionality in that it defeats one of the features of another toolbox they sell. In time, I believe they will grant this privledge, but it does not exist today. Also, why not use a dynamic input block to change the input value, like a map, signal builder, etc. ?

提交回复
热议问题