Matlab program for Remez exchange algorithm.
[n,fo,ao,w] = firpmord(f,a,dev,fs). Finds the approximate order, normalized frequency band edges, frequency band amplitudes, and weights.
b = firpm(n,f,a,w) returns row vector b containing the n+1 coefficients of the order n FIR filter whose frequency-amplitude characteristics match those given by vectors f and a.
Matlab code
clc; clear all; close all;
rp=input('Enter the Passband ripple (In db) = ');