MATLAB: Does the Spectrum Scope in the DSP Blockset show an incorrect frequency range when the “Inherit sample time from input” check box is selected and the input is a muxed signal

blocksetconcatenationdspfrequencyfromfsinheritinputmatrixmuxrangesamplescopespectrumtime

Why does the Spectrum Scope in the DSP Blockset show an incorrect frequency range when the "Inherit sample time from input" check box is selected and the input is a muxed signal?
My input to the Spectrum Scope is a muxed signal, consisting of two signals of the same sample time. The Frequency range of the axis properties is set to [-Fs/2 … Fs/2] and the Inherit sample time from input check box is selected. However, the frequency range displayed during simulation is actually from -Fs to Fs.

Best Answer

This is a not bug in the DSP Blockset. If you have installed the documentation, double-click on a Spectrum Scope and click the Help button to see the documentation for this block. Pay special attention to the following documentation fragment:
When the Inherit sample time from input check box is selected, the block computes
the frequency data from the sample period of the input to the block. This is valid
when the following conditions hold:
·The input to the block is the original signal, with no samples added or
deleted (by insertion of zeros, for example).
·The sample period of the time-domain signal in the simulation is equal
to the period with which the physical signal was originally sampled.
One example when these conditions do not hold, is such as when the input to the
block is not the original signal, but a zero-padded or otherwise rate-altered
version. In such cases, you should specify the appropriate value for the Sample
time of original time-series parameter.
Since a muxed signal is a rate-altered version of the original signal, the Inherit sample time from input check box should not be selected. If you have a multi-channel signal and want to use inherit sample time in the Spectrum Scope, horizontally concatenate signals using the Matrix Concatenation block from the DSP Blockset/Math Functions/Matrices and Linear Algebra/Matrix Operations library. The step-by-step instructions are as follows:
1.Drag a Matrix Concatenation block into your model.
2.Double click on it.
3.Specify Number of inputs, which should be the same as the number of the channels.
4.Set Concatenation method to Horizontal.
5.Connect the signals to the input ports of the Matrix Concatenation block.
6.Connect the output port of the Matrix Concatenation block to the Spectrum Scope.