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

📄 fsresp.m

📁 信号实验常用的simulink模型和mfile,可直接在matlan下运行。
💻 M
字号:
function y=fsresp(num,den,un,wo)
%FSRESP	Fourier Series Linear System Response.
%	FSRESP(N,D,Un,Wo) returns the complex exponential FS of the
%	output of a linear system when the input is given by a FS.
%	N and D are the numerator and denominator coefficients
%	respectively of the system transfer function.
%	Un is the complex exponential Fourier Series of the system input.
%	Wo is the fundamental frequency associated with the input.
if nargin<4,wo=1;end
N=(length(un)-1)/2;		% highest harmonic
jnWo=sqrt(-1)*(-N:N)*wo;	% frequencies of harmonics
y=(polyval(num,jnWo)./polyval(den,jnWo)).*un;	% output is Yn=H(jnWo)*Un

⌨️ 快捷键说明

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