comp.soft-sys.matlab #37423 (17 + 404 more) (1)--[1] From: Peter John Acklam [1] Re: minimax approximation M-file? Date: Fri Dec 05 13:46:37 EST 1997 James F. Epperson wrote: > Has anyone constructed an M-file that does a minimax approximation? > I searched the Mathworks site but could not find anything. It seems > like an obvious choice -- in fact, I am surprised that it is not > included in Matlab in the first place. > > What I would like, ideally, is something that took a function name, > an interval, a weight function name, and a degree as arguments, and > returned the coefficients of the minimax polynomial. I really don't > want to write my own Remez algorithm code for this . . . There is a 'mimimax' function in the Optimization Toolbox (v1.5.1). There is a 'remez' function is in the Signal Processing Toolbox (v 4.0.1), but for some strange reason it is not in the Optimization Toolbox. There are both 'minimax' and 'remez' algorithms in Maple (and probably also Mathematica), but if you don't have any of them it isn't much help. Peter End of article 37423 (of 37445) -- what next? [npq] comp.soft-sys.matlab #37449 (30 + 381 more) (1)--(1)--[1] From: jim.mcclellan@ee.gatech.edu (Jim McClellan) [1] Re: minimax approximation M-file? Date: Sat Dec 06 07:23:00 EST 1997 Lines: 39 CREMEZ in the signal processing toolbox will do the "function name" part with a weight function and a "degree", but it uses a basis set consisting of complex exponentials over the interval (-pi,pi], ie, specific to FIR digital design. You would have to transform the polynomial problem on an interval [a,b] to the exponential form used in digital filter design, or a cosine form. A bit of a pain, but not impossible. The substitution is something like: 2(x-m)/(b-a) = cos(w) where m = (a+b)/2 This maps x to w (omega). Usually the interval [-1,1] is mapped to [0,pi] for the FIR filter design problem. .......jim In article <34884C0D.1CFB@ulrik.uio.no>, Peter John Acklam wrote: J> James F. Epperson wrote: J> > J> > Has anyone constructed an M-file that does a minimax approximation? J> > I searched the Mathworks site but could not find anything. It seems J> > like an obvious choice -- in fact, I am surprised that it is not J> > included in Matlab in the first place. J> > J> > What I would like, ideally, is something that took a function name, J> > an interval, a weight function name, and a degree as arguments, and J> > returned the coefficients of the minimax polynomial. I really don't J> > want to write my own Remez algorithm code for this . . . J> J> There is a 'mimimax' function in the Optimization Toolbox (v1.5.1). J> There is a 'remez' function is in the Signal Processing Toolbox J> (v 4.0.1), but for some strange reason it is not in the Optimization J> Toolbox. J> J> There are both 'minimax' and 'remez' algorithms in Maple (and J> probably also Mathematica), but if you don't have any of them J> it isn't much help. J> J> Peter End of article 37449 (of 37644) -- what next? [npq]