I do not get the same error in 2023a with the same code, so this may be a bug in 2023b, or I may have different code generation settings.
Comms Toolbox Raised Cosine Transmit Filter produces "Insufficient number of outputs" error when running Check for Run-Time Issues in MATLAB Coder
10 次查看(过去 30 天)
显示 更早的评论
I am trying to generate C code with MATLAB Coder for the comm.RaisedCosineTransmitFilter function. Whether I use it in a larger function, or a small function just to test it, I get an error at the "Check for Run-Time Issues" step and am unable to continue with code generation.
My code is as follows:
function filterOutput = txFilterProcess(inputSamples)
txFilter = comm.RaisedCosineTransmitFilter('Shape','Square root',...
'RolloffFactor',0.21,'FilterSpanInSymbols',14,...
'OutputSamplesPerSymbol',2,'Gain',1);
filterOutput = txFilter(inputSamples);
The error is as follows:
Insufficient number of outputs from right hand side of equal sign to satisfy assignment.
Insufficient number of outputs from right hand side of equal sign to satisfy assignment.
I have tried both complex single and double precision inputs, changing the rolloff factor, filter span, output samples, and removing the gain setting, but all seem to produce the same error. I have also tried preallocating the filterOutput variable with the expected output size, and get the same error.
Running the code normally in MATLAB does not produce any errors.
3 个评论
Denis Gurchenkov
2023-10-8
Hi AmSat, here are two steps you can use to diagnose the issue:
- What happens if you run the matlab coder via the command line, without the GUI, do you get the same error? E.g. if you type this in MATLAB command line:
codegen txFilterProcess -args {1}
what happens then?
2. If you tell MATLAB to stop on the first error:
dbstop if all error
and then run the command that errors. Do you see MATLAB stopped in some file? Where?
Given your problem description, most likely scenario is some kind of installation issue, so that some files are damaged or missing. You can either troubleshoot yourself (see suggestions above) or contact MathWorks technical support.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!