Linear Scale of a Frequency Response Plot (freqz) - Digital Filter

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.

 Respuesta aceptada

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

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by