Not able to reach minimum phase using Hilbert transform My problem is pretty simple, I've designed a magnitude response and I would like to find the corresponding minimum phase filter. I'm using the code below and unless there is a bug my eyes don't want to see, I'm pretty confident on the methodology. 

nbTaps = 100;
fs = 96000;
desiredMagn_dB = [0 0 -100 -100];
f = [0 24000 26000 fs/2];

FIRFreq = (0:nbTaps/2)*fs / nbTaps;

FIRMagn = interp1(f, 10.^(desiredMagn_dB./20), FIRFreq);
FIRMagn = [FIRMagn fliplr(FIRMagn(2:end-1))];

minPhase = -imag(hilbert(log(FIRMagn)));

freqResp = FIRMagn.*exp(1i.*minPhase);

FIRCoefs = ifft(freqResp, 'symmetric');


And yet, my filter has not a minimal phase, since I have zeros outside the unit circle. I am a little bit lost, here, and I would like to understand why is so? or where I am wrong? 

EDIT from r b-j:

nbTaps = 16384;
fs = 96000;
desiredMagn_dB = [0 0 -100 -100];
f = [0 24000 26000 fs/2];

FIRFreq = (0:nbTaps/2)*fs / nbTaps;

FIRMagn = interp1(f, 10.^(desiredMagn_dB./20), FIRFreq);
FIRMagn = [FIRMagn fliplr(FIRMagn(2:end-1))];

minPhase = -imag(hilbert(log(FIRMagn)));

freqResp = FIRMagn.*exp(1i.*minPhase);

FIRCoefs = ifft(freqResp, 'symmetric');

figure(1)
plot(20*log10(FIRMagn))
figure(2)
plot(minPhase)
figure(3)
plot(FIRCoefs)


i don't see anything unexpected.
More taps. You don't have anywhere near enough taps for a filter that steep. Start large with 8192 or so cut to desired accuracy, if needed
Due to the low number of tabs you are seeing the effect of "circular" hilbert transform. See for example: http://andrewduncan.net/air/
How do you know you have zeros outside the unit circle? Calculating the roots of a high order polynomial is a numerically difficult problem and using a Matlab function like "roots()" will given you often inaccurate or plainly wrong results.