フィルターのクリア

Comms Toolbox Raised Cosine Transmit Filter produces "Insufficient number of outputs" error when running Check for Run-Time Issues in MATLAB Coder

1 回表示 (過去 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.
Use help codegen for more information on using this command.
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
Denis Gurchenkov 2023 年 10 月 8 日
Hi AmSat, here are two steps you can use to diagnose the issue:
  1. 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.
AmSat518
AmSat518 2023 年 10 月 10 日
Hi Denis,
I essentially get the same error with the first input, and an "Index must not exceed 0" for the second input.
I should note that MATLAB Coder otherwise works fine on this installation. If I comment out this line, I can generate C code without any issues, which makes me think an installation issue is less likely, though I understand it's possible.
Here's the output:
>> codegen txFilterProcess -args {1}
Insufficient number of outputs from right hand side of equal sign to satisfy assignment.
Use help codegen for more information on using this command.
Error using codegen
>> dbstop if all error
>> codegen txFilterProcess -args {1}
Caught-error breakpoint was hit in coder\private\generateBuildConfig at line 0. The error was:
Index exceeds the number of array elements. Index must not exceed 0.
In base workspace.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by