Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.3 - English

Change language to:
Français - 日本語 - Português

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Signal Processing > remez

remez

Remez exchange algorithm for the weighted chebyshev approximation of a continuous function with a sum of cosines.

Calling Sequence

an=remez(guess,mag,fgrid,weight)

Arguments

guess

real array of size n+2 theinitial guess

fgrid

real array of size ng: the grid of normalized frequency points in [0,.5[

mag

real array of size ng: the desired magnitude on grid fg

weight

real array of size ng: weighting function on error on grid fg

an

real array of size n: cosine coefficients

Description

Minimax approximation of a frequency domain magnitude response. The approximation takes the form

h = sum[a(i)*cos(weight)], i=1:n

An FIR, linear-phase filter can be obtained from the the output of remez by using the following commands:

hn(1:nc-1)=an(nc:-1:2)/2;
hn(nc)=an(1);
hn(nc+1:2*nc-1)=an(2:nc)/2;

This function is mainly intended to be called by the remezb function.

Bibliography

E.W. Cheney, Introduction to Approximation Theory, McGraw-Hill, 1966

http://en.wikipedia.org/wiki/Remez_algorithm

References

This function is based on the fortran code remez.fwritten by:

  • James H. Mcclellan, department of electrical engineering and computer science, Massachusetts Institute of Technology, Cambridge, Massachussets. 02139

  • Thomas W. Parks, department of electrical engineering, Rice university, Houston, Texas 77001

  • Thomas W. Parks, department of electrical engineering, Rice university, Houston, Texas 77001

Examples

nc=21;
ngrid=nc*250;
fgrid=.5*(0:(ngrid-1))/(ngrid-1);
mag(1:ngrid/2)=ones(1:ngrid/2);
mag(ngrid/2+1:ngrid)=0*ones(1:ngrid/2);
weight=ones(fgrid);
guess=round(1:ngrid/nc:ngrid);
guess(nc+1)=ngrid;
guess(nc+2)=ngrid;
an=remez(guess,mag,fgrid,weight);

See Also

  • remezb — Minimax approximation of magnitude response
  • eqfir — minimax approximation of FIR filter
<< pspect Signal Processing remezb >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Oct 05 12:09:56 CEST 2011