FIR filter coefficients from frequency responses
The frequency argument for freqz() should be in radians/second, not normalized frequency in [0,1). It has a form that makes it easy for you:

% length of frequency response vector
N = 50;
% cutoff frequency
wc = 0.25;
% design 12th-order lowpass filter
b1 = fir1(12, wc);
% calculate its frequency response at `N` points around unit circle
hd = freqz(b1, 1, N, 'whole');
% inverse transform the frequency response
b2 = ifft(hd);
% `b1` and `b2` should be the same.
plot(1:length(b1), b1, 1:length(b2), b2);


This yields the plot:



You only see one trace because they are right on top of one another, as they should be. b2 is longer in duration because it has the same length as the frequency response vector, which was arbitrarily chosen to have length 50.