Simulink

How can i multiple 's' to the gain(K) in feedback of my block diagram? I get the value of gain(K) from GUI window.

댓글 수: 1

TAB
TAB 2012년 4월 3일
Plaese explore your question. It has very less information.

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

답변 (1개)

K E
K E 2012년 4월 2일

0 개 추천

The set_param function can be used to set a value such as a gain. Here is an example. The gain value supplied to set_param must be a string, not a number.
for iGain = 1:length(listOfGainValues)
strGain = num2str(listOfGainValues(iGain)) ;
set_param('yourModel/yourBlock/Gain', 'Gain', strGain) ;
% Run your simulation here with this gain value
end

댓글 수: 2

asha jyothi
asha jyothi 2012년 4월 2일
thanks for your reply.
basically, my question is not about using the gain from code. but its about how can i multiply 's' to the gain(k) in simulink.
K E
K E 2012년 4월 3일
Can you please explain? Do you want your GUI to increase the gain prior to simulation, or do you want to add a block that increases the gain by a factor of s during the simulation, or...?

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

카테고리

도움말 센터File Exchange에서 General Applications에 대해 자세히 알아보기

제품

질문:

2012년 3월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by