正在加载图片...
0 0.2 04 图14.5线性系统的输入输出曲线 作为最后一个例子,运用 fsform把锯齿信号的富里哀级数转换为三角形式 unction[a, b, ao]=fsform(c, d, co) FSFORM Fourier Series Format Conversion KN=FSFORM(An, Bn, Ao) converts the trigonometric FS with An being the cSoine and Bn being the sine coefficients to the complex exponential FS with coefficients Kn Ao is the DC component and An, Bn and Ao are assumed to be real [Kni]=FSFORM(An, Bn, Ao) returns the index vector i that identifies the harmonic number of each element of Kn [An, Bn, Ao]=FSFORM(Kn) does the reverse format conversion Copyrigth(c)1996 by Prentice-Hall, Inc c=length(c) if nargin==1% complex exp-> trig form if rem(nc-1, 2)I(nc=1) error( Number of elements in K must bo odd and greater than 1) nn=(nc+3)/2; a=2*real(c(nn: nc)) b=-2*imag(c(nn: nc) ao=real(c(nn-D))0 0.1 0.2 0.3 0.4 -2 0 2 4 6 8 10 12 图 14.5 线性系统的输入输出曲线 作为最后一个例子,运用 fsform 把锯齿信号的富里哀级数转换为三角形式。 function [a, b, ao]=fsform(c, d, co) % FSFORM Fourier Series Format Conversion % KN=FSFORM(An, Bn, Ao) converts the trigonometric FS with % An being the CSOINE and Bn being the SINE coefficients to % the complex exponential FS with coefficients Kn. % Ao is the DC component and An,Bn and Ao are assumed to be real. % % [Kni]=FSFORM(An, Bn, Ao) returns the index vector i that % identifies the harmonic number of each element of Kn. % % [An, Bn, Ao]=FSFORM(Kn) does the reverse format conversion. % Copyrigth (c) 1996 by Prentice-Hall,Inc. nc=length(c); if nargin==1 % complex exp -> trig form if rem(nc-1, 2)|(nc==1) error(‘ Number of elements in K must bo odd and greater than 1 ‘) end nn=(nc+3)/2; a=2*real(c(nn : nc)); b=-2*imag(c(nn : nc)); ao=real(c(nn-1));
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有