请教各位高手,程序如下,运行时会出现这样的错误:
?? Undefined function or method 'ge' for input arguments of type 'sym'.
Error in ==> Untitled0124 at 42
if (t>=0+n*T_sp)&&(t<=(2-c_sp)*T_sp+n*T_sp);
其中k_mpis,k_mpir,k_m12,k_m34,T_sp均为已知。
d=0.3;
k_m=[k_mpis,k_mpir,k_m12,k_m34];
k_a=d*k_m;
syms t
n=0;
while 1
if (t>=0+n*T_sp)&&(t<=(2-c_sp)*T_sp+n*T_sp);
k_pis=k_mpis-k_a(1)
else k_pis=k_mpis+k_a(1)
n=n+1;
end
end