|
楼主 |
发表于 2007-4-1 16:49
|
显示全部楼层
figure('pos',[120,130,300,300],'color','w');
axes('pos',[0.1 0.15 0.8 0.72]);
syms s t
T=2;K=1;rt=4;
T1=sym(num2str(T));K1=sym(num2str(K));
k=2;gs=2;rt=2;et=rt;
for tt=0:0.1:40;
enlsat=gs*et;
if enlsat>k,eout=k;
elseif enlsat<-k,eout=-k;
else eout=enlsat;
end
ee=sym(num2str(eout));
y1=ilaplace(K*ee/s/(T1*s^2+s+1));
et=rt-y1;det=diff(et);
et1=subs(et,tt);det1=subs(det,tt);
plot(et1,det1);hold on;
end
grid
??? Function 'gt' is not defined for values of class 'sym'.
帮忙看一下 |
|