Linear Scale of a Frequency Response Plot (freqz) - Digital Filter
8 views (last 30 days)
Show older comments
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.
0 Comments
Accepted Answer
Paulo Silva
on 11 Mar 2011
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
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!