# sgrid

Generate s-plane grid of constant damping factors and natural frequencies

## Syntax

``sgrid``
``sgrid(zeta,wn)``
``sgrid(___,'new')``
``sgrid(AX,___)``

## Description

example

````sgrid` generates a grid of constant damping factors from 0 to 1 in steps of 0.1 and natural frequencies from 0 to 10 rad/sec in steps of one rad/sec for pole-zero and root locus plots. `sgrid` then plots the grid over the current axis. `sgrid` creates the grid over the plot if the current axis contains a continuous s-plane root locus diagram or pole-zero map.```
````sgrid(zeta,wn)` plots a grid of constant damping factor and natural frequency lines for the damping factors and natural frequencies in the vectors `zeta` and `wn`, respectively. `sgrid(zeta,wn)` creates the grid over the plot if the current axis contains a continuous s-plane root locus diagram or pole-zero map.Alternatively, you can select Grid from the context menu to generate the same s-plane grid.```
````sgrid(___,'new')` clears the current axes first and sets `hold on`.```
````sgrid(AX,___)` plots the s-plane grid on the `Axes` or `UIAxes` object in the current figure with the handle `AX`. Use this syntax when creating apps with `sgrid` in the App Designer.```

## Examples

collapse all

Create the following continuous-time transfer function:

`$H\left(s\right)=\frac{2{s}^{2}+5s+1}{{s}^{2}+2s+3}$`

`H = tf([2 5 1],[1 2 3]);`

Plot the root locus of the transfer function.

`rlocus(H)`

Plot s-plane grid lines on the root locus.

`sgrid`

## Input Arguments

collapse all

Damping ratio, specified as a vector in the same order as `wn`.

Normalized natural frequency, specified as a vector.

Object handle, specified as an `Axes` or `UIAxes` object. Use `AX` to create apps with `sgrid` in the App Designer.