MATLAB Answers

Translated by

このページのコンテンツは英語から自動翻訳されています。自動翻訳をオフにする場合は「<a class="turn_off_mt" href="#">ここ</a>」をクリックしてください。

0

compiling error while generating code for function with user-defined class

David Morin さんによって質問されました 2019 年 2 月 19 日
最新アクティビティ David Morin さんによって 回答されました 2019 年 2 月 20 日
Hello every one.
I want to generate a mex for a function with user-defined object in it. Before implementing my project, I tried the example given by Mathworks here : https://fr.mathworks.com/help/simulink/ug/generate-code-for-matlab-value-classes.html
However, the compilation failed at step 5 and I can't figure out why. Every time I get the following error :
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
Of course I didn't change any line of code from the example and the use_shape function works well in Matlab. I also tried with another very simple and self-made user-defined class and function and got the exact same error.
The Mathwork example is given for the Simulink coder and I work with the Matlab one. Any chance the error comes from here? If so, how can generate code using the matlab coder? And if not, any ideas?
Many thanks!

  0 件のコメント

サインイン to comment.

1 件の回答

回答者: David Morin 2019 年 2 月 20 日
 採用された回答

So I found the answer. I post it here in case someone get the same error.
It appears the generation report causes the problem. I don't know why. Anyway, I just disable the generation report and everything works fine.

  0 件のコメント

サインイン to comment.



Translated by