changing continuous transfer function

조회 수: 8 (최근 30일)
Mohammad mahdavyfakhr
Mohammad mahdavyfakhr 2020년 2월 2일
답변: Mohammad mahdavyfakhr 2020년 2월 3일
Hi Every one,
I have a continuous trnsfer function and I want autimatically shift all s values by a value as w.
For example if I have the following transfer function
s=tf('s')
H=1/(0.002*s+10);
I want to obtain H(s+w) as H(s+w)=1/(0.002*(s+w)+10)
For this transfer function I can easily subtitute s with s+w but if the transfer function is long with multiple coefficents it is not an effective way. So Im wondering if there is a way so that I can autoimatically shift all s values?
Thanks

답변 (2개)

Mohammad Sami
Mohammad Sami 2020년 2월 2일
You should just define your transfer function as a function. You can then just pass in the values you want to evaluate on.
H = @(s)1/(0.002*s+10);
s = 10;
w = 2;
Hsw = H(s+w);

Mohammad mahdavyfakhr
Mohammad mahdavyfakhr 2020년 2월 3일
Yes, thank you, this works when I first define a transfer function, but in case the transfer function is obtained from other code like:
H=@(s) tf([1],[1 1]);
w = 2;
we cannot have H(s+w) right.

카테고리

Help CenterFile Exchange에서 Dynamic System Models에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by