FIR filter coefficients from frequency responses I have frequency responses of FIR filter of order 13 from obtained 50 frequency samples. How can I get FIR filter coefficients of order 13? 

For example, in MATLAB a lot of possible ways I tried ;

I have a frequency samples : w=[0 1] (1x50) 

I have frequency responses of FIR filter of order 13: hd (1x50)

b1=fir1(12,wc) % b1:FIR filter ideal coefficients of order 13

hd=freqz(b1,1,w) %hd :FIR filter frequency responses with respect to b1



When I apply inverse fourier transform to FIR filter frequency responses ( ifft(hd,13) ), I don't reach b1. I am supposed to reach b1 coefficients in theory. Am I right?
I apply inverse fft shift for moving to true domain before apply Fourier Transform( ifft( ifftshift(hdg),13) ) but also I don't reach b1. So what else can I do?


There is incompatible things(may be between frequencies and transforms ) I don't understand.
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.