请教,这个程序,我怎么用不了啊?
clear
clc
syms ks ms mu ku C_off C_on alpha s w
A=[0,1,0,-1;-ks/ms,-(C_off+alpha*(C_on-C_off))/ms,0,C_off/ms;0,0,0,1;ks/mu,C_off/mu,-ku/mu,-((1-alpha)*(C_on-C_off)+C_off)/mu];
B=[0,0,-1,0]';
C=[1,0,0,0];
D=0;
I=eye(4,4);
G=C*inv(s*I-A)*B+D;
% [n,d]=ss2tf(A,B,C,D);
% =ss(A,B,C,D);
C2=[0,1,0,0];
C3=[0,0,1,0];
G2=C2*inv(s*I-A)*B+D;
G3=C3*inv(s*I-A)*B+D;
output=[G;G2;G3];
[num,den]=numden(output);
num=collect(num,'s');
den=collect(den,'s');
我的问题就是把G的分子分母的系数提出来,还有就是
G1=subs(G,'s',j*w);
% Fn=int(G1,w,-inf,inf)
我要对G1求积分,上下限分别是-inf,inf。用int感觉太慢了,怎么办? |