Categories &

Functions List

Function Reference: sgrid

Function File: sgrid  
Function File: sgrid on
Function File: sgrid off
Function File: sgrid (z, w)
Function File: sgrid (hax, …)

Display an grid in the complex s-plane.

Control the display of s-plane grid with :

  • zeta lines corresponding to damping ratios and
  • omega circles corresponding to undamped natural frequencies

The function state input may be either "on" or "off" for creating or removing the grid. If omitted, a new grid is created when it does not exist or the visibility of the current grid is toggled.

The sgrid will automatically plot the grid lines at nice values or at constant values specified by two arguments :

 sgrid (Z, W)
 

where Z and W are :

  • Z vector of constant zeta values to plot as lines
  • W vector of constant omega values to plot as circles

Example of usage:

 sgrid on	create the s-plane grid
 sgrid off 	remove the s-plane grid
 sgrid		toggle the s-plane grid visibility
 sgrid ([0.3, 0.8, ...], [10, 75, ...])   create:
               zeta lines for 0.3, 0.8, ...
               omega circles for 10, 75, ... [rad/s]
 sgrid off; sgrid  remove current s-grid and
                   draw new with default values
 sgrid (hax, "on")   create the s-plane grid for the axis
                     handle hax
 

Source Code: sgrid

 

 clf;
 num = 1; den = [1 4 5 0];
 sys = tf(num, den);
 rlocus(sys);
 sgrid on;

                    
plotted figure

 

 clf;
 num = [1 3]; den = [1 5 20 16 0];
 sys = tf(num, den);
 rlocus(sys);
 hfig = get(0, "currentfigure");
 hax = get(hfig, "currentaxes");
 sgrid(hax, "on");

                    
plotted figure

 

 clf;
 num = 1; den = [1 4 5 0];
 sys = tf(num, den);
 rlocus(sys);
 sgrid([0.5 0.7 0.89], [1 1.66 2.23]);

                    
plotted figure