
Control Systems: increase the number of M-circles on a Nichol's plot?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
With regards to the nichols() function, is there any way to:
- increase the density of M contours (after the grid has been turned on). For example, in screenshot, you might notice that the plot (blue) comes close to touching the 6dB circle but doesnt quite touch it. If there was only another (or maybe a couple of) intermediate circle(s) between 3dB and 6dB...
- Make the dB values of the circles appear on them even when zoomed in. The question mark in red is actually a -3dB circle but because I have zoomed in, it is not visible.

Are there any ways to address these issues (through code or from the gui interface)? Thanks for your time!
0 Kommentare
Antworten (1)
Akanksha
am 1 Mär. 2025
Below code will add more M-contours manually and keep the labels visible even when zoomed in :
% Step 1: Define a system
% Here we define a simple transfer function: G(s) = 1 / (s + 1)
sys = tf(1, [1 1]);
% Step 2: Plot the Nichols chart
figure; % Open a new figure
nichols(sys); % Plot Nichols chart of 'sys'
title('Nichols Chart with Custom M-Contours'); % Add a title
% Step 3: Add more M-contours
% We define a custom set of dB values for the magnitude circles.
% Adjust these values as needed to get finer resolution.
hold on; % Keep the current plot
M = [-12 -9 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 9 12];
ngrid(M); % Force Nichols grid to include these M-contours
% Step 4: Adjust axis limits
% It helps keep labels visible when zoomed.
xlim([-200 -60]); % Phase axis in degrees
ylim([-20 20]); % Gain axis in dB
% Step 5 (Optional): Manually add a label to see how text works
% For instance, label the point where phase=-90°, gain=3 dB
text(-90, 3, 'My Label at -90°, 3 dB', 'FontWeight','bold', ...
'HorizontalAlignment','left', 'Color','r');
Please find the attached output :

Following are some references that will help with understanding the functions used in the above code and their properties :
Hope this helps. Thanks.
1 Kommentar
Andrew Ouellette
am 5 Mär. 2025
For the record, ngrid(M) is not valid syntax (surprisingly this corresponds to ngrid('new')). It is not possible to change the densitry of the m contours currently.
The labels do get automatically replaced after zoom operations starting in R2024b.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!