Clear Filters
Clear Filters

Code Generation Report prevents Mex generation

1 view (last 30 days)
Hello everyone,
I have an issue with Matlab Coder. I can't generate a Mex file when a generation report is produced. For example with the testCodegen function below :
function y = testCodegen(x)
y = x + 2;
end
I have no error when building a Mex function without generating a report :
codegen -args {1} testCodegen
However, the following error arrive when a report is produced :
codegen -report -args {1} testCodegen
Compilation failed.
Error: Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To
construct matrices, use brackets instead of parentheses.
Use help codegen for more information on using this command.
Error using codegen
The situation is the same when using the Coder App. This is really bothering me because I can't locate errors while building more complex Mex files! I didn't get this error a few weeks ago, I can't figure out where it comes from.
Does anyone has an idea?
  1 Comment
Ryan Livingston
Ryan Livingston on 2 Mar 2019
This sounds like an installation problem. I suggest getting in touch with MathWorks Techincal Support: https://www.mathworks.com/support/contact_us.html to help diagnose the issue.
As a start I'd try:
restoredefaultpath
rehash toolboxcache
and then try codegen again. Beyond that, definitely suggest Technical Support.

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!