求助matlab求传递函数问题
function f=m()s=tf('s');G=12/(s*(s+1)^3).*exp(-2*s)
Gc=tf(,,'Variable','s')
f=feedback(G,Gc)
??? Error using ==> exp
Function 'exp' is not defined for values of class 'tf'.
求G,Gc的单位负反馈函数。{:{23}:} 系统是通过tf编写的 LZ的版本是多少?
s=tf('s');G=12/(s*(s+1)^3).*exp(-2*s), 在R2006a & R2009a是不会报错的! 回复 3 # ChaChing 的帖子
我的是6.5的版本。。 在R2008a上执行的结果:
%------------m.m----------------
function f=m()
s=tf('s');G=12/(s*(s+1)^3).*exp(-2*s)
Gc=tf(,,'Variable','s')
f=feedback(G,Gc)
%---------------------------------
Transfer function:
12
exp(-2*s) * -----------------------
s^4 + 3 s^3 + 3 s^2 + s
Transfer function:
2 s + 3
-------
s
??? Error using ==> lti.feedback at 127
Error using ==> ltipack.tfdata.feedback at 20
System interconnection gives rise to internal
delays and can only be represented in state
space. Convert at least one of the models to
state space using the "ss" command.
Error in ==> Untitled at 4
f=feedback(G,Gc) 没怎么研究过tf, 早期版本的tf 好象不能处理带有延时环节
tf 函数在Matlab 6.5 与 matlab 2009a的help 中提到
in Matlab 6.5You can then specify transfer functions directly as rational expressions
in S or Z, e.g.,
s = tf('s');H = (s+1)/(s^2+3*s+1)in Matlab 2009You can then specify transfer functions directly as expressions in S
or Z, e.g.,
s = tf('s');H = exp(-s)*(s+1)/(s^2+3*s+1)
页:
[1]