Histogram
SinksThe Histogram block accumulates incoming scalar values over the simulation run and renders their frequency distribution as a bar histogram. Values are sorted into a fixed number of equal-width bins spanning a user-defined range, giving an at-a-glance view of the statistical character of a signal.
This block is well suited to noise analysis, Monte Carlo result inspection, and quality-control monitoring where the shape of the distribution — not the time-series waveform — is the quantity of interest.
Inputs & Outputs
| Direction | ID | Label | Type | Status |
|---|---|---|---|---|
| → In | in |
Input | array | Required |
Parameters
| Parameters | Label | Type | Default | Description |
|---|---|---|---|---|
rangeMode |
Range | select | auto |
Auto fits the axis to the data; Manual uses the Min/Max below. |
minValue |
Min Value | number | -5 |
Lower bound (Manual range only). |
maxValue |
Max Value | number | 5 |
Upper bound (Manual range only). |
binMode |
Binning | select | count |
How bins are sized: a fixed number, a fixed step width, or auto. |
bins |
Bin count | number | 20 |
Number of bins (Bin count mode). |
binWidth |
Bin width | number | 1 |
Width/step of each bin (Fixed width mode). |
Usage Examples
Analysing sensor noise
NoiseSensor → Histogram
Connect a noisy sensor output directly to the Histogram to observe whether the noise is approximately Gaussian and to measure its spread.
Monte Carlo output distribution
RandomSource → Plant → Histogram
Drive the plant with a random input source; the Histogram displays the resulting output distribution across the simulation run.
Remarks & Best Practices
- Sink block: Histogram has no output ports. It is a terminal display node and does not feed any downstream computation.
- Scalar input: The input port accepts a scalar numeric signal. Each simulation step contributes one sample to the accumulated distribution.
- Accumulation: Unlike instantaneous display blocks, the Histogram accumulates all samples from simulation start. The distribution becomes more stable as the run length increases.
- Range clamping: Samples outside
[minValue, maxValue]are counted in the boundary bins, not discarded. Adjust the range if the distribution appears heavily clipped.
Related Components
- BarChart: Displays per-element values of an array signal rather than a statistical distribution.
- ScatterPlot: Plots pairs of scalar values to reveal correlation between two signals.
- uPlotDisplay: Monitors the time-series waveform of a signal over the full simulation run.