I have the output of a fir2 function, that is a digital fir filter. I can evaluate it for a given frequency range using freqz, but I need to evaluate it even for the complex variable "s". Therefore, my idea was to transform the fir filter into a continuous transfer function (TF) and, then, evaluate TF for a given complex number using evalfr. But when I do the bode of the transfer function, the response is completely different. Can you help me? (see the code below):
FiltFreq=[0:100];
FiltAmp=cos(FiltFreq/100*pi/2);
BF=fir2(50,FiltFreq/FiltFreq(end),FiltAmp);
RespDig=freqz(BF,1,FiltFreq/FiltFreq(end)*pi);
figure;
plot(FiltFreq,FiltAmp); hold all
plot(FiltFreq,abs(RespDig));
legend('Target response magnitude','Fir response magnitude')
tr_fun=tf(BF,1);
figure;
bode(tr_fun);