From: <car...@us...> - 2012-05-01 12:41:17
|
Revision: 10344 http://octave.svn.sourceforge.net/octave/?rev=10344&view=rev Author: carandraug Date: 2012-05-01 12:41:10 +0000 (Tue, 01 May 2012) Log Message: ----------- __ellip_ws, __ellip_ws_min, ncauer: the functions __ellip_ws and __ellip_ws_min are now subfunctions of ncauer. Usage text on both mention them to be subfunctions of ncauer and nellip. nellip no longer exists, it was renamed ellip on revision 444. Loking at its code, this function was never dependent on any of the __ellip_ws functions, only on ncauer. Revision Links: -------------- http://octave.svn.sourceforge.net/octave/?rev=444&view=rev Modified Paths: -------------- trunk/octave-forge/main/signal/NEWS trunk/octave-forge/main/signal/inst/ncauer.m Removed Paths: ------------- trunk/octave-forge/main/signal/inst/__ellip_ws.m trunk/octave-forge/main/signal/inst/__ellip_ws_min.m Modified: trunk/octave-forge/main/signal/NEWS =================================================================== --- trunk/octave-forge/main/signal/NEWS 2012-05-01 12:21:00 UTC (rev 10343) +++ trunk/octave-forge/main/signal/NEWS 2012-05-01 12:41:10 UTC (rev 10344) @@ -6,6 +6,9 @@ ** Package is no longer automatically loaded + ** The functions `__ellip_ws' and `__ellip_ws_min' have been removed (they + are now subfunctions of `ncauer'. + =============================================================================== signal-1.1.2 Release Date: 2012-01-06 Release Manager: Lukas Reichlin =============================================================================== Deleted: trunk/octave-forge/main/signal/inst/__ellip_ws.m =================================================================== --- trunk/octave-forge/main/signal/inst/__ellip_ws.m 2012-05-01 12:21:00 UTC (rev 10343) +++ trunk/octave-forge/main/signal/inst/__ellip_ws.m 2012-05-01 12:41:10 UTC (rev 10344) @@ -1,35 +0,0 @@ -## Copyright (C) 2001 Paulo Neis <p_...@ya...> -## -## This program is free software; you can redistribute it and/or modify it under -## the terms of the GNU General Public License as published by the Free Software -## Foundation; either version 3 of the License, or (at your option) any later -## version. -## -## This program is distributed in the hope that it will be useful, but WITHOUT -## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -## details. -## -## You should have received a copy of the GNU General Public License along with -## this program; if not, see <http://www.gnu.org/licenses/>. - -## usage: ws = __ellip_ws(n, rp, rs) -## -##Function used by nellip()/ncauer(). -##Calculate the stop band edge for the Cauer filter. -## -## References: -## -## - Serra, Celso Penteado, Teoria e Projeto de Filtros, Campinas: CARTGRAF, -## 1983. - -function ws=__ellip_ws(n, rp, rs) - kl0 = ((10^(0.1*rp)-1)/(10^(0.1*rs)-1)); - k0 = (1-kl0); - int = ellipke([kl0 ; k0]); - ql0 = int(1); - q0 = int(2); - x = n*ql0/q0; - kl = fminbnd(@(y) __ellip_ws_min(y,x) ,eps, 1-eps); - ws = sqrt(1/kl); -endfunction Deleted: trunk/octave-forge/main/signal/inst/__ellip_ws_min.m =================================================================== --- trunk/octave-forge/main/signal/inst/__ellip_ws_min.m 2012-05-01 12:21:00 UTC (rev 10343) +++ trunk/octave-forge/main/signal/inst/__ellip_ws_min.m 2012-05-01 12:41:10 UTC (rev 10344) @@ -1,32 +0,0 @@ -## Copyright (C) 2001 Paulo Neis <p_...@ya...> -## -## This program is free software; you can redistribute it and/or modify it under -## the terms of the GNU General Public License as published by the Free Software -## Foundation; either version 3 of the License, or (at your option) any later -## version. -## -## This program is distributed in the hope that it will be useful, but WITHOUT -## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -## details. -## -## You should have received a copy of the GNU General Public License along with -## this program; if not, see <http://www.gnu.org/licenses/>. - -## usage: err = __ellip_ws_min(kl, x) -## -## Function used by nellip()/ncauer(). -## -## References: -## -## - Serra, Celso Penteado, Teoria e Projeto de Filtros, Campinas: CARTGRAF, -## 1983. - -function err=__ellip_ws_min(kl, x) - - int=ellipke([kl; 1-kl]); - ql=int(1); - q=int(2); - err=abs((ql/q)-x); - -endfunction Modified: trunk/octave-forge/main/signal/inst/ncauer.m =================================================================== --- trunk/octave-forge/main/signal/inst/ncauer.m 2012-05-01 12:21:00 UTC (rev 10343) +++ trunk/octave-forge/main/signal/inst/ncauer.m 2012-05-01 12:41:10 UTC (rev 10344) @@ -110,3 +110,24 @@ zer=(sqrt(ws)).*zer; endfunction + +## usage: ws = __ellip_ws(n, rp, rs) +## Calculate the stop band edge for the Cauer filter. +function ws=__ellip_ws(n, rp, rs) + kl0 = ((10^(0.1*rp)-1)/(10^(0.1*rs)-1)); + k0 = (1-kl0); + int = ellipke([kl0 ; k0]); + ql0 = int(1); + q0 = int(2); + x = n*ql0/q0; + kl = fminbnd(@(y) __ellip_ws_min(y,x) ,eps, 1-eps); + ws = sqrt(1/kl); +endfunction + +## usage: err = __ellip_ws_min(kl, x) +function err=__ellip_ws_min(kl, x) + int=ellipke([kl; 1-kl]); + ql=int(1); + q=int(2); + err=abs((ql/q)-x); +endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |