求助,哪里出错了?
??? Function 'ge' is not defined for values of class 'sym'. 原帖由 jennychung 于 2007-4-1 16:39 发表??? Function 'ge' is not defined for values of class 'sym'.
请贴具体代码及完整的错误信息 figure('pos',,'color','w');
axes('pos',);
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'.
帮忙看一下 原帖由 jennychung 于 2007-4-1 16:49 发表
figure('pos',,'color','w');
axes('pos',);
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;
...
估计是符号变量不能比较,你自己调试一下看哪里用错了
页:
[1]