sidBodePlot¶
Python equivalent:
sid.bode_plot
Bode diagram with confidence bands.
Plots the magnitude (dB) and phase (degrees) of the estimated frequency response with shaded confidence bands (default: +/-3sigma).
Inputs¶
| Name | Description |
|---|---|
result |
FreqResult struct (see sidResultTypes §1). Required fields: .Response, .Frequency, .FrequencyHz, .SampleTime Optional fields: .ResponseStd (for confidence bands) |
Name-value options¶
| Name | Description |
|---|---|
'Confidence' |
Number of standard deviations for the shaded confidence band. Default: 3. Set to 0 to hide. |
'FrequencyUnit' |
'rad/s' (default) or 'Hz'. |
'Color' |
Line color. Default: [0 0.447 0.741] (MATLAB blue). |
'LineWidth' |
Line width. Default: 1.5. |
'Axes' |
[ax_mag, ax_phase] axes handles. Creates new figure if empty. |
Outputs¶
| Name | Description |
|---|---|
h |
Struct with fields .fig, .axMag, .axPhase, .lineMag, .linePhase. |
Examples¶
N = 1000; u = randn(N, 1);
y = filter([1], [1 -0.9], u) + 0.1*randn(N, 1);
result = sidFreqBT(y, u);
sidBodePlot(result, 'Confidence', 3);
Specification¶
(Bode plotting — not yet in SPEC.md)
See also¶
Changelog¶
- 2026-03-24: First version by Pedro Lourenço.