How can I make the FREQZ function (in the Signal Processing or Filter

D
Diego · Mar 17, 2021 · 2.6K views
Question
How can I make the FREQZ function (in the Signal Processing or Filter Design Toolboxes) produce a plot with a logarithmic frequency axis? The FREQZ function plots frequency on a linear axis. I would like an option to have frequency plot on a logarithmic axis instead.  
Expert Answer
Profile picture of Prashant Kumar
Prashant Kumar PhD Expert
Answered Sep 8, 2026
The ability to have the FREQZ function in the Communications Toolbox plot using a logarithmic frequency axis is not available.
 
To work around this issue, adjust the axis type after creating the figure. This can be done by executing the following MATLAB commands after plotting with FREQZ:
 
ax = findall(gcf, 'Type', 'axes');

set(ax, 'XScale', 'log');
This will reset the scale on the "x" axes (there are two, superimposed--one for magnitude, one for phase). You will likely wish to specify new x-axis limits. This can be done by executing:
 
 
 
set(ax, 'XLim', [xmin xmax]);
where "xmin" and "xmax" are your desired lower and upper x-axis limits, respectively.
 
Alternatively, you can return the filter response information by using the FREQZ syntax:
[h, w] = freqz(...);
where your particular arguments are included in place of "...".
 
Then, you can use the SEMILOGX function or other other  plot functions to create your custom plots from "h" and "w".
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!