我在生成c代码的时候​遇到了这样的问题,有​没有大神可以帮忙看看​,感激不尽!!!!

75 ビュー (過去 30 日間)
艳荣
艳荣 2023 年 11 月 6 日
コメント済み: genqiang lan 2024 年 2 月 28 日
错误:创建代码接口描述文件 codeInfo.mat 时出现内部错误。正在中止代码生成。
原因:
Simulink 对象名称无效: 'Ramjet'。
The block diagram 'Ramjet' is not loaded.

回答 (1 件)

Amish
Amish 2023 年 11 月 14 日
Hi 艳荣,
请注意,我会用英语回答,因为中文不是我的主要语言
(Please note that I will answer in English as Chinese is not my primary language)
As I can understand from the translation in English, I see that you are facing issues with generating C Code. The error that you are facing in here is quite common and can be easily resolved.
The error part saying,The block diagram 'Ramjet' is not loaded” tells that the model you are trying to generate code for is not correctly loaded. You can load the model by using the command:
load_system <model name>
Once it loaded, it is always beneficial to check if it has been loaded correctly. You can do this by using the command:
which <Model name> -all
In a rare case that this does not solve your error, check for duplicates of the "coderInfo.mat" file and remove the ones unrelated to the project.
Documentation Links for your reference:
Load Model:
Another answer with similar error:
Hope this helps!
  1 件のコメント
genqiang lan
genqiang lan 2024 年 2 月 28 日
I have encountered a similar problem. Do you know how to solve it? Thank you!

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

カテゴリ

Help Center および File ExchangeSimulink 函数 についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!