MATLAB 中 零极点增益模型转换为多项式传递函数模型出错 求朋友们帮忙解决z=[-3,-2.5];p=[-5,-2,-15];k=[10];g=zpk(z,p,k)[num,den]=zp2tf(z,p,k)sys1=tf(num,den)[A,B,C,D]=zp2ss(z,p,k)sys2=ss(A,B,C,D)Error using ==> zp2tfZ and P must be column vectors.Error in ==> s1 at 5[num,den]=zp2tf(z,p,k)

问题描述:

MATLAB 中 零极点增益模型转换为多项式传递函数模型出错 求朋友们帮忙解决
z=[-3,-2.5];
p=[-5,-2,-15];
k=[10];
g=zpk(z,p,k)
[num,den]=zp2tf(z,p,k)
sys1=tf(num,den)
[A,B,C,D]=zp2ss(z,p,k)
sys2=ss(A,B,C,D)
Error using ==> zp2tfZ and P must be column vectors.
Error in ==> s1 at 5[num,den]=zp2tf(z,p,k)

那你就都改成column vectors
z=[-3;-2.5];
p=[-5;-2;-15];