image thumbnail

MATLAB Plot Gallery - Semilogx Plot

by

 

Create an x-axis semilog plot

Semilogx_Plot

This is an example of how to create an x-axis semilog plot in MATLAB®.

Read about the semilogx function in the MATLAB® documentation.

Go to MATLAB Plot Gallery

% Load the response data
load responseData frequency magnitude;

% Create an x-axis semilog plot using the semilogx function
figure;
semilogx(frequency, magnitude);

% Set the axis limits and turn on the grid
axis([min(frequency) max(frequency) -6.5 6.5]);
grid on;

% Add title and axis labels
title('Magnitude Response (dB)');
xlabel('Frequency (kHz)');
ylabel('Magnitude (dB)');

Contact us