Matlab Coder: Error when using some functions

1 回表示 (過去 30 日間)
hoang tuan
hoang tuan 2023 年 4 月 19 日
コメント済み: hoang tuan 2023 年 4 月 19 日
I'm using Matlab coder to convert my Matlab code to C.
I have some error related to below functions, and have some questions.
  1. imwrite function cannot be converted. Is there any other function that i can use?
  2. I'm using insertShape function as belowed:
insertShape(IMG, 'Rectangle',[AREA_L AREA_U AREA_W AREA_H], 'LineWidth', 5, 'Color', 'red');
The Error is : コード生成では COLOR は数値でなければなりません。
What does it mean? How can I fix it?
Thank you.
  1 件のコメント
hoang tuan
hoang tuan 2023 年 4 月 19 日
For the Matlab coder, we cannot setting the color by name such as red, yellow...
For fix the above error of insertShape(),I changed to:
insertShape(IMG, 'Rectangle',[AREA_L AREA_U AREA_W AREA_H], 'LineWidth', 5, 'Color', [255,0,0]);
The error is cleared and pass the generation process.

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

回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!