The “Mean” Block in Simulink meets errors when the input is complex number
Mostra commenti meno recenti
As show in this model, the binary bit stream is modulated by 16-QAM, followed by the 8 up-sampling and AWGN module. In the scenario, the optimal receiver is calculating the average value of each 8 samples.

However, the model report error:
Unsigned integer or fixed-point signals must be real. (See the figure below)

By examining the setting of “Mean” block, I found that the relative setting of fixed-point is system default. In MATLAB Help system, it’s described that the mean of a complex input is computed independently for the real and imaginary components.(showed below)

Hence, I tried other method of calculating mean value of complex number, including the following 4 kinds(Screenshot is below):
- Calculate the real part and imaginary part of the complex number. The result showed that it’s right.
- I built the block calculating the mean value using the “Submatrix” module. The result showed that it’s right.
- Let the output of “Mean” block to Workspace. The result showed that it’s right.
- I write the m code calculating the mean value in “MATLAB Fun” block. The result showed that it’s right.


I find a strange phenomenon that the output of “Mean” block cannot connect to “Rectangular QAM Demodulator Baseband” block. Otherwise MATLAB will report error.
I have examined the data type and data dimension. It shows that there’s no problem.
My Operating System: Windows 7 with 64Bit.
MATLAB: R2015a
The right and wrong mdl modle file is attached in the last.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Communications Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!