gusucode.com > matlab编程遗传算法计算匹配电路源码程序 > code1/code/MATLAB源代码/matlab_match/abg2.m

    function [ s21 ] = abg2( f )
%UNTITLED 此处显示有关此函数的摘要
%   此处显示详细说明
%f=6:0.01:10;
a1=9.258;
b1=4.053;
c1=0.3592;
a2=16.41;
b2=4.877;
c2=0.6529;
a3=16.75;
b3=2.955;
c3=1.23;
a4=15.66;
b4=5.927;
c4=0.6198;
s21=a1*exp(-((f-b1)./c1).^2)+a2*exp(-((f-b2)./c2).^2)+a3*exp(-((f-b3)./c3).^2)+a4*exp(-((f-b4)./c4).^2)-9;
%s21=a1*exp(-((f-b1)/c1)^2)+a2*exp(-((f-b2)/c2)^2)+a3*exp(-((f-b3)/c3)^2)+a4*exp(-((f-b4)/c4)^2)-9;
%s21=10^(s21/20);
%s21_degree=(f-6)*15+30;
%plot(f,s21)
%max(s21)
end