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

📄 fun.m

📁 里面囊括了基于matlab滤波器设计的各种.m文件
💻 M
字号:
 
% The objective function of the optimization
% The greater the Alfa, the better the stopband
% Successful but the result is not very good

function [f,g] = fun(x)
f1 = 0;
f2 = 0;
f = 0;
Alfa=0.7;
N = size(x,2);

stopedge = 0.4*pi;
omega = stopedge;
step = (pi-stopedge)/1024;
for I = 1:1024
  omega = omega + step;
  for J = 1:N
    c(J) = cos(((J-1)+0.5)*omega);
  end
  part = x*c'*c*x';
  f1 = f1 + part;
end

⌨️ 快捷键说明

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