kratio.m
来自「有关matlab的电子书籍有一定的帮助希望有用」· M 代码 · 共 22 行
M
22 行
function a = kratio(m,krat)
%KRATIO Utility function for use with ELLIP.
% KRATIO(m,krat) is a function used to calculate the zeros of an
% elliptic filter. It is used with FMINS to find a parameter m
% satisfying ellipke(m)/ellipke(1-m) = krat.
% Copyright (c) 1988-98 by The MathWorks, Inc.
% $Revision: 1.10 $ $Date: 1997/11/26 20:13:40 $
% to ensure we don't call ellipke(1) which is inf on non-ieee machines
% and that we only call with positive m.
m = min(1,max(m,0));
if abs(m) > eps & abs(m)+eps < 1
k = ellipke([m,1-m]);
r = k(1)./k(2) - krat;
elseif abs(m) <= eps % m==0
r = -krat;
else % m==1 => r == inf, but can't for non-ieee machines
r = 1e20;
end
a = abs(r);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?