## BodePlot(function, variable, minimum, maximum, mode)

function
The function to plot.

variable
The independent variable.

minimum
Start sweep frequency : ωmin (rad/sec).

maximum
End sweep frequency : ωmax (rad/sec).

mode
mode = 0 : magnitude plot (= default mode)
mode = 1 : phase plot in degrees
mode = 2 : phase plot in radians

## Description

BodePlot creates a Bode plot for the given function.

The x-axis is a logarithmic scale and represents the frequency in rad/sec.
• x = -2 : => ω = 0.01 rad/sec
• x = -1 : => ω = 0.1 rad/sec
• x = 0 : => ω = 1 rad/sec
• x = 1 : => ω = 10 rad/sec
• x = 2 : => ω = 100 rad/sec
• x = 3 : => ω = 1000 rad/sec
When the frequency is not given, then ωmin = 0.01 rad/sec and ωmax = 1000 rad/sec.

The y-axis is either the magnitude in dB (mode=0) or the phase in degrees (mode=1) or the phase in radians (mode=2).

## Examples

BodePlot((0.1+s)/((0.001s+1)*(1+0.5s^2)), s, 0.01, 10000, 0)
BodePlot((0.1+s)/((0.001s+1)*(1+0.5s^2)), s, 0.01, 10000, 1)
BodePlot((30+s/10)^2/((s+10)^3), s, 0.1, 1000)
BodePlot((30+s/10)^2/((s+10)^3), s, 0.1, 1000, 1)
BodePlot(1/(1+s^2), s, 0.01, 1000, 1)
BodePlot((s+10)(s+1000)/((s+1)*(s+100)*(s+10000)), s, 0.1, 100000, 0)
BodePlot((s+10)(s+1000)/((s+1)*(s+100)*(s+10000)), s, 0.1, 100000, 1)

## References

http://en.wikipedia.org/wiki/Bode_plot

Plot