I don't know the algorithm. With Matlab I use only this command: B = fir1(N,Wn) where N is the order and the Wn the cut-off frequency.