⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fsharm.m

📁 精通Matlab综合辅导与指南 用于数学建模的教科书
💻 M
字号:
function [h,ih]=fsharm(kn,n)%FSHARM Fourier Series Harmonic Component Selection.% FSHARM(Kn,N) returns the (N)th harmonic component of the% complex exponential FS given by Kn.% FSHARM(Kn) returns the DC component.% [H,i]=FSHARM(Kn,N) returns the index of the selected% harmonic H in i.% D.C. Hanselman, University of Maine, Orono, ME 04469% 1/12/95% Copyright (c) 1996 by Prentice-Hall, Inc. m=length(kn);if nargin==1,n=0;endif rem(m,2),      % kn has an odd number of elements  ih=(m+1)/2+n;   % index of desired harmonic  if (ih>m)|(ih<1)   h=0;ih=[];     % desired harmonic is outside range  else   h=kn(ih);       % index is fine   if n==0,h=real(h);end  %DC component is real only!  endelse,             % x has an even number of harmonics  h=[];ih=[];  error('Kn must have an odd number of elements')end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -