MATLAB: Linear Scale of a Frequency Response Plot (freqz) – Digital Filter

digital filterfreqzplot

The freqz(z,p) gives the plot of magnitude in dB (log scale) versus the normalized frequency. However, I would like to have linear scale (0-1 for the y-axis), is it doable? If yes, please assist me how to do it.
The continuous respond has the ffplot function to show the linear scale, while the discreet I cannot find such a function.

Best Answer

clf
freqz([1],[-1 -2]); %example values
ax=get(gcf,'Children'); %get the axes handles
li=get(ax(1),'Children'); %get the handle for the line object in the first axe
r=get(ax(1),'YLabel'); %get the annotation handle
set(r,'String','Magnitude') %set the string to just Magnitude
ydata=get(li,'Ydata'); %get the log data
y=10.^(ydata/20); %the conversion takes place here
set(li,'Ydata',y); %replace the log Ydata by the linear