cconv.m

来自「分数阶Fourier变换程序」· M 代码 · 共 31 行

M
31
字号
function y = cconv(x, h)% lconv -- perform a circular convolution with ffts%%  Usage%    y = cconv(x, h)%%  Inputs%    x, h   input vectors (must have the same length)%%  Outputs%    y      the circular convolution of x and h% Copyright (C) -- see DiscreteTFDs/Copyrighterror(nargchk(2, 2, nargin));x = x(:);N = length(x);h = h(:);M = length(h);if (M ~= N)  error('Input vectors must have the same length')endy = ifft( fft(x) .* fft(h));if (isreal(x) & isreal(h))  y = real(y);end

⌨️ 快捷键说明

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