필터 지우기
필터 지우기

How to assign a variable used in a simulink block parameters?

조회 수: 1 (최근 30일)
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 !

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2012년 12월 27일
편집: Azzi Abdelmalek 2012년 12월 27일
In matlab command type
Nb_ser=yourvalue
%or in m-file which you will run before your simulation
  댓글 수: 2
Raj Shankar
Raj Shankar 2012년 12월 27일
Am I able to mention it somewhere in the simulink window or inside the block itself.
In case if I need to change it.
Azzi Abdelmalek
Azzi Abdelmalek 2012년 12월 27일
편집: Azzi Abdelmalek 2012년 12월 27일
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
  1. right click on your simulink model then click model properties
  2. click on callbacks
  3. in Init fcn type Nb_ser=yourvalue

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by