0
votes

For the Bode plot below, I am trying to remove the title and the input/output line:

Sample Bode Plot

I have found methods to null the title line, but these do not 'collapse' it - which would make it pointless as my reason for removing the title is conserving the space it takes.

I also want to get entirely rid of the line detailing the input and output but I have not even managed to edit the contents there.

I have investigated the solution provided here and the Matlab help files for bode, bodeplot and bodeoptions.

What would be the appropriate code solution for achieving this?

For a MWE, try the below but as this applies generally, I am not sure this is useful for this question:

bode(tf([10000 0],[1 2.5 1.15]))
1

1 Answers

1
votes

Save the gain and phase vectors and plot them out seperately with whatever title and x/y labels you would like:

[mag,phase,wout] = bode(tf([10000 0],[1 2.5 1.15]))

Here is an example of how to get a similar plot without a title:

% Plot 
% Old way
bode(tf([10000 0],[1 2.5 1.15]))

% new way
figure(2)
[mag,phase,wout] = bode(tf([10000 0],[1 2.5 1.15]))
ax1 = subplot(2,1,1) % gain plot
    plot(wout, 20*log10(mag(:)))
    set(gca, 'XScale', 'log')
    ylabel('Magnitude (dB)')
ax2 = subplot(2,1,2) % Phase plot 
    plot(wout, phase(:))
    set(gca, 'XScale', 'log')
    xlabel('Frequency (rad/s)')
    ylabel('Phase (deg)')