How to set fixed values to Simulink parameters instead of variable?
Mostra commenti meno recenti
Maybe there is an easy solution to this but i dont konw how to do it.
Lets say for example i do have a variable "a" with the value "2" in matlab and i want to set a gain block parameter to the value of "a" which is 2. Naturally i would write "a" into the parameter. If i do now save the Simulink model and use it later, it always requires a variable "a" in the Matlab Workspace. But i dont want it to be linked to the variable but instead to be actually the value of that variable.
Hope this is understandable.
This is just boiled down to an easy example.
I am searching for something like: set_param([...],'value',valueof(a))
Alternatively: instead of setting the fixed values to the simulink block parameters, is it posiible to save all necessary variables with the Simulink model?
Thanks.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Model, Block, and Port Callbacks in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!