bodemag (Control Design and Simulation Module, MathScript Function)
Member of the frqrsp class.
Syntax
bodemag(SysIn, attributes)
bodemag(SysIn, attributes, [wmin wmax])
bodemag(SysIn, attributes, wlist)
[mag, wout] = bodemag(SysIn)
[mag, wout] = bodemag(SysIn, [wmin wmax])
[mag, wout] = bodemag(SysIn, wlist)
Description
Creates the Bode magnitude plot of a system model. If you do not specify an output, this function creates a plot.
Inputs
Name | Description | ||||||||||||||||||||||||||||||||
SysIn | Specifies a linear time-invariant (LTI) system model in transfer function, zero-pole-gain, or state-space form. | ||||||||||||||||||||||||||||||||
attributes | Specifies valid plot attributes. Order the plot attributes by color, point-style, and line-style. For example, 'bo-' specifies that the plot is blue, marks points with circles, and uses solid lines. attributes is a string that can take a combination of the following values:
|
||||||||||||||||||||||||||||||||
wmin | Specifies the initial frequency, in radians/second, this function uses to calculate the frequency response of the SysIn model. The default value is 0.001. You also can use the wlist input to specify exact frequencies instead of a range. wmin is a real scalar. | ||||||||||||||||||||||||||||||||
wmax | Specifies the final frequency, in radians/second, this function uses to calculate the frequency response of the SysIn model. The default value is 1000. You also can use the wlist input to specify exact frequencies instead of a range. wmax is a real scalar. | ||||||||||||||||||||||||||||||||
wlist | Specifies the frequency values, in radians/second, at which this function calculates the frequency response of the SysIn model. If you specify only two elements for this input, this function treats those elements as wmin and wmax. Therefore, you must specify at least three elements for the wlist input. wlist is a real vector consisting of three or more elements. |
Outputs
Name | Description |
mag | Returns the magnitude(s) of the SysIn model. mag is a real matrix. |
wout | Returns the frequencies at which this function calculates the magnitude(s). w is a real vector. |
Examples
z = 1
p = [-1, -2]
k = 0.5
SysIn = zpk(z, p, k)
bodemag(SysIn, 'g')