A highly optimized translation of the core discrete Remez part of the Parks-McClellan (PM) algorithm from its original FORTRAN code to its MATLAB counterpart has recently been proposed by the authors. The optimization was achieved by first figuring out that the search for the “real” extremal points of the weighted error function formed based on the “trial” extremal points can be compressed into two compact search techniques and, second, by using the MATLAB strength of vectors and matrices calculations whenever possible. Most importantly, this achievement revealed that the search technique in the original PM algorithms does not follow the fundamental principle of the Remez multiple exchange (RME) algorithm. That is, if there are more candidate “real” extremal points than required, then the desired points should be selected to retain as many largest absolute values of the weighted error function as possible subject the condition that the sign of this function alternates at the consecutive points. This paper modifies the earlier MATLAB implementation of the core discrete Remez part of PM algorithm to exactly follow the above-mentioned search principle. This modification results in a highly optimized MATLAB code which outperforms the very original MATLAB code in, terms of the code compactness, the required number of iterations and CPU execution time, as is illustrated by means of several examples.
['Muhammad Ahsan', 'Tapio Saramäki']
A MATLAB based optimum multiband FIR filters design program following the original idea of the Remez multiple exchange algorithm