MATLAB: Does Create Diagonal Matrix block not return the diagonal matrix in Signal Processing Blockset 6.1 (R14SP1)

6.1blocksetcreatediagonalmatrixnotptocessingr14sp1signalwrong

I have a simple complex vector as an input to the Create Diagonal Matrix block in Signal Processing Blockset 6.1 (R14SP1). When I check the output matrix in the Display block it has some non-zero off the main diagonal elements.

Best Answer

This bug has been fixed in Signal Processing Blockset 6.2 (R14SP3). For previous product releases, read below for any possible workarounds:
We have verified that there is a bug in Signal Processing Blockset 6.1 (R14SP1) in the way that Create Diagonal Matrix block handles complex inputs.
To work around this issue, use the MATLAB Fcn block and MATLAB DIAG command.