157k views
1 vote
On Matlab for bode plots, how do you change the x axis limits to something like 0.10 to 100? I tried xlimits([0.1 100]) but matlab ignores this for bode plots.

User Xenon
by
8.4k points

1 Answer

4 votes

To change the x-axis limits for Bode plots in MATLAB to something like 0.10 to 100, you will use this code:

% Generate a Bode plot

sys = ([1],[1 10 100]);

bode(sys);

% Set the x-axis limits

xlim([0.1 100]);

You first create the Bode plot by defining your transfer function using the function. In this example, we have a simple transfer function `1 / (s^2 + 10s + 100)`.

Now, use the `bode` function to plot the Bode diagram for your system. And finallyy, set the x-axis limits using the `xlim` function. In this case, we set the limits to `[0.1 100]`.

User Erik  Reppen
by
9.1k points