
求懂matlab的大神帮忙看下这个程序的错误在哪(急):
clear;clc;s=tf('s');G=1/(s*(s+1)*(0.1*s+1));rlocus(G);[k,p]=rlocfind(G);symsk1;symsk2...
clear;
clc;
s=tf('s');
G=1/(s*(s+1)*(0.1*s+1));
rlocus(G);
[k,p]=rlocfind(G);
syms k1;
syms k2;
k1=10/((2*0.707)^2);
k2=5;
G1=k1/(s*(s+1)*(0.1*s+1));
G2=k2/(s*(s+1)*(0.1*s+1));
[y1,t]=step(G1);
[y2,t]=step(G2);
S1=stepinfo(y1,t);
S2=stepinfo(y2,t);
我用这个程程序求系统的各种参数,前面的可以运行,但是到了stepinfo就错了,我也不知道怎么回事?
界面出现这个==:
??? Undefined command/function 'stepinfo'.
Error in ==> Untitled at 15
stepinfo(y1) 展开
clc;
s=tf('s');
G=1/(s*(s+1)*(0.1*s+1));
rlocus(G);
[k,p]=rlocfind(G);
syms k1;
syms k2;
k1=10/((2*0.707)^2);
k2=5;
G1=k1/(s*(s+1)*(0.1*s+1));
G2=k2/(s*(s+1)*(0.1*s+1));
[y1,t]=step(G1);
[y2,t]=step(G2);
S1=stepinfo(y1,t);
S2=stepinfo(y2,t);
我用这个程程序求系统的各种参数,前面的可以运行,但是到了stepinfo就错了,我也不知道怎么回事?
界面出现这个==:
??? Undefined command/function 'stepinfo'.
Error in ==> Untitled at 15
stepinfo(y1) 展开
展开全部
S1=stepinfo(y1,t);
S2=stepinfo(y2,t);
应该为';' 不要用中文全角字符';'
>> S1
S1 =
RiseTime: 1.1504e+003
SettlingTime: 1.4104e+003
SettlingMin: 6.4754e+003
SettlingMax: 7.1923e+003
Overshoot: 0
Undershoot: 0
Peak: 7.1923e+003
PeakTime: 1.4391e+003
>> S2
S2 =
RiseTime: 1.1504e+003
SettlingTime: 1.4104e+003
SettlingMin: 6.4734e+003
SettlingMax: 7.1901e+003
Overshoot: 0
Undershoot: 0
Peak: 7.1901e+003
PeakTime: 1.4391e+003
S2=stepinfo(y2,t);
应该为';' 不要用中文全角字符';'
>> S1
S1 =
RiseTime: 1.1504e+003
SettlingTime: 1.4104e+003
SettlingMin: 6.4754e+003
SettlingMax: 7.1923e+003
Overshoot: 0
Undershoot: 0
Peak: 7.1923e+003
PeakTime: 1.4391e+003
>> S2
S2 =
RiseTime: 1.1504e+003
SettlingTime: 1.4104e+003
SettlingMin: 6.4734e+003
SettlingMax: 7.1901e+003
Overshoot: 0
Undershoot: 0
Peak: 7.1901e+003
PeakTime: 1.4391e+003
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询