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

8 次查看(过去 30 天)
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.

采纳的回答

Paulo Silva
Paulo Silva 2011-3-11
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

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by