Error: Time object cannot be empty
19 次查看(过去 30 天)
显示 更早的评论
Hi matlab community,
when i tried to generate code from simulink, there is an error:
Internal error while creating code interface description file: codeInfo.mat. Aborting code generation.
Caused by:
Time object cannot be empty
I have tried the which codeInfo.mat -all methods, but it seems not helpful. When I restart the matlab again, it works once, but it always fails after the first run.
Best,
Yuting
2 个评论
Rahul
2024-10-21,11:25
Hi @Yuting Cong, can I know which operating system and MATLAB release are you using, that'll help in better understanding the issue.
回答(1 个)
Rahul
2024-10-22,7:19
I understand that you’re trying to generate code from a Simulink model, but instead getting an error stating “Time object cannot be empty”.
This is most likely caused by a second ‘codeInfo.mat’ file on the path, which can be identified using:
>> which codeInfo.mat -all
Then, remove the second file from the path, which is unrelated to the model. If this does not resolve the error message, you can try restoring the default MATLAB path. You can do so by running the following commands:
>> restoredefaultpath
>> rehash toolboxcache
>> sl_refresh_customizations
You might also consider saving your current path before you run the above commands.
Moreover, you can check out a similar MATLAB Answer regarding this issue:
More information can be found on MATLAB Answers post "How can I perform initial troubleshooting of MATLAB or Simulink errors?"
Hope it helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Environment Customization 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!