DSPRelated.com
Code

This function helps in converting linear phase fir filter transfer function to min phase fir filter transfer function

January 31, 20111 comment Coded in Matlab

Minimum phase FIR filter provides minimum group delay and minimum group delaydistortion within the passband. In this function we take in the coefficients of the linear phase filter as an input. Internally it pulls in all zeros which are outside the unit circle to inside of unit circle. 

function [hn_min] = lp_fir_2_mp_fir(hn_lin)

% This function helps in converting the linear phase 
% FIR filter to minimum phase FIR filter. It essentially 
% brings all zeros which are outside the unit circle to 
% inside of unit circle.

r 	= roots(hn_lin);
k	= abs(r) > 1.01;
r1  	= r(k);		% roots outside of unit circle.
r2	= r(~k);% roots on or within the unit circle
s	= [1./r1; r2];
hn_min	= poly(s);
hn_min	= hn_min*sqrt(sum(hn_lin.^2))/sqrt(sum(hn_min.^2));