"Insufficient number of outputs from right hand side of equal sign to satisfy assignment." in Simulink

I got the error above in Simulink and that is the part of the model that causes it.
The interpolation factor of the DUC is 100. The slx-file is attached
Thanks :)

11 Comments

It will be a lot easier to answer the question if the model is attached, rather than a screenshot. That will allow people with expertise to investigate relevant block parameters and such.
Hi Daniel, thanks for your answer. Here is a minimal example, that causes this error.
Looks like you will also need to attach rtty_pinneberg_147_3kHz.wav
Yeah, you are right. I uploaded a zip, that contains the wav and the slx.
I can now replicate the problem, but unfortunately I realized am not familiar enough with the details of the blocks you are using to be able to guide you as how to resolve the issue. Now that you have a simple example to replicate the problem, hopefully someone can offer a solution.
I'm not seeing an issue when I run it on my system (MATLAB R2023a Update 4 for Windows, all toolboxes installed). I tried updating the model and running it, and it's set to simulate using code generation.
@ Daniel I am also on MATLAB R2023a Update 4 for Windows, but I can only run the OP's code in Interpreted mode.
Can't seem to cut and paste the error message, but here is what it says:
An error occurred in the block upconverter/Digital Up-Converter' during compile.
Caused by:
  • Insufficient number of outputs from right hand side of equal sign to satisfy assignment.
Component Simulink|Category:Block Error
Here is my Ver output
>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.14.0.2306882 (R2023a) Update 4
MATLAB License Number: 22059
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 19045)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.14 (R2023a)
Simulink Version 10.7 (R2023a)
Control System Toolbox Version 10.13 (R2023a)
DSP System Toolbox Version 9.16 (R2023a)
Database Toolbox Version 11.0 (R2023a)
MATLAB Compiler Version 8.6 (R2023a)
MATLAB Compiler SDK Version 7.2 (R2023a)
Model Predictive Control Toolbox Version 8.1 (R2023a)
Optimization Toolbox Version 9.5 (R2023a)
Requirements Toolbox Version 2.2 (R2023a)
Robust Control Toolbox Version 6.11.3 (R2023a)
Signal Processing Toolbox Version 9.2 (R2023a)
Simulink Check Version 6.2 (R2023a)
Simulink Control Design Version 7.0 (R2023a)
Simulink Coverage Version 5.6 (R2023a)
Spreadsheet Link Version 3.4.9 (R2023a)
Stateflow Version 10.8 (R2023a)
Statistics and Machine Learning Toolbox Version 12.5 (R2023a)
System Identification Toolbox Version 10.1 (R2023a)
Strange. Identical MATLAB, different results. I wonder if we're using different compilers perhaps.
I'm also on Windows 11. Hopefully that's not causing the difference.
My compilers are mingw64-g++ and mingw64. I can find that through the following commands:
comps = mex.getCompilerConfigurations
comps.ShortName
I wonder what compilers you and OP are running.
Thank you @Daniel @Jon!
I tried switching to "Interpreted execution" but still get the same error.
Only got this meaningless output when trying to figure out my compiler configuration:
Running the .slx on a Linux-System worked for me.
That output just means you have no compilers installed. 0x1 is an empty matrix, basically. (No rows, 1 column, technically. No elements regardless.) So it makes sense that generated code wouldn't work; that interpreted execution wouldn't work is a little stranger. What toolboxes do you have installed? (Paste the output of ver)
Alternatively, at this point a support ticket might be best, especially if interpreted execution isn't working either. It looks like what you're trying to do should work, given that it does work for Jon and me, so it might easily be a configuration issue rather than an issue with the model itself.

Sign in to comment.

Answers (1)

I found that if I changed the "Simulate using" parameter on the DUC from Code Generation to Interpreted execution, the model ran without errors. So, maybe there is a bug with the Code Generation, or somehow it is just fussier, and there is still an issue, it just doesn't surface with the Interpreted execution.

Products

Release

R2023a

Asked:

on 3 Aug 2023

Commented:

on 7 Aug 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!