📄 fsresize.m
字号:
function [y,iy]=fsresize(kn,n)%FSRESIZE Resize a Fourier Series.% FSRESIZE(Kn,N) resizes the complex exponential FS Kn to% have N harmonics. If N is greater than the number of% harmonics in Kn, zeros are added to the result.% If N is less than the number of harmonics in Kn, the% result is a truncated version of the input.%% FSRESIZE(Kn,Un) resizes the complex exponential FS Kn to% have the same number of harmonics as the FS Un.%% [Yn,iy]=FSRESIZE(Kn,N) additionally returns the harmonic% index of the result.% D.C. Hanselman, University of Maine, Orono, ME 04469% 1/12/95% Copyright (c) 1996 by Prentice-Hall, Inc. m=length(kn);N=length(n);if N>1, n=(N-1)/2; endnkn=(m-1)/2; % number of harmonics in knif n>=nkn zpadd=zeros(1,n-nkn); y=[zpadd kn(:).' zpadd];else no=nkn+1; %index of DC harmonic y=kn(no-n:no+n);endm=(length(y)-1)/2;iy=-m:m;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -