How to assign a variable used in a simulink block parameters?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have used a battery block.
And in its block parameters I have used the variable '2.7*Nb_ser' for defining the nominal voltage value of the battery.
So where should I mention the 'Nb_ser' value?
Nb_ser is the number of cells connected in series.
Can someone help me !
0 Commenti
Risposta accettata
Azzi Abdelmalek
il 27 Dic 2012
Modificato: Azzi Abdelmalek
il 27 Dic 2012
In matlab command type
Nb_ser=yourvalue
%or in m-file which you will run before your simulation
2 Commenti
Azzi Abdelmalek
il 27 Dic 2012
Modificato: Azzi Abdelmalek
il 27 Dic 2012
What do you mean by inside a block? Inside a block, you've chosen to set a value to 2.7*Nb_ser, if you want to change this value, just change it in matlab command. Now if you want to mention this value in simulink window fellow these steps
- right click on your simulink model then click model properties
- click on callbacks
- in Init fcn type Nb_ser=yourvalue
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Interactive Model Editing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!