sidSpectrogramPlot¶
Python equivalent:
sid.spectrogram_plot
Spectrogram color map plot.
sidSpectrogramPlot(result)
sidSpectrogramPlot(result, 'FrequencyScale', 'log')
h = sidSpectrogramPlot(...)
Plots the spectrogram as a time-frequency color map with power in dB.
Inputs¶
| Name | Description |
|---|---|
result |
SpectrogramResult struct (see sidResultTypes §3). Required fields: .Time, .Frequency, .PowerDB, .SampleTime |
Name-value options¶
| Name | Description |
|---|---|
'FrequencyScale' |
'linear' (default) or 'log'. |
'Channel' |
Channel index to plot for multi-channel data. Default: 1. |
'CLim' |
Color axis limits [cmin cmax] in dB. Default: [] (auto). |
'Axes' |
Axes handle. Creates new figure if empty. |
Outputs¶
| Name | Description |
|---|---|
h |
Struct with fields .fig, .ax, .surf. |
Examples¶
% Plot spectrogram of a chirp signal
Fs = 1000; Ts = 1/Fs; N = 5000;
t = (0:N-1)' * Ts;
x = cos(2*pi * (50 + 100*t/max(t)) .* t);
result = sidSpectrogram(x, 'WindowLength', 256, 'SampleTime', Ts);
sidSpectrogramPlot(result);
Specification¶
SPEC.md §7.5 — Visualization
See also¶
Changelog¶
- 2026-03-28: First version by Pedro Lourenço.