Unable to run code analysis
16 次查看(过去 30 天)
显示 更早的评论
Hi guys, I am creating 3d models but when I am doing so I noticed that matlab is not running code analysis:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1218277/image.png)
I do not have space bar in the names, yet this error still occurs.
May I know what is going on? Thanks!
0 个评论
采纳的回答
Walter Roberson
2022-12-4
Your file is named 3d_model.mlx . However, the file names for MATLAB source code ( .m ) and Live Script ( .mlx ) and Simulink models ( .mdl and .slx ) are all required to be valid MATLAB identifiers -- so must start with an English alphabetic letter, and can then be followed by English Alphabetic letters, the digits 0 to 9, or underscore ( '_' ) .
You need to rename your mlx so that it does not start with a digit.
2 个评论
Benjamin
2023-12-15
I was having the same problem. The weird thing was that the code would still run, but would always have a little red error flag on the side. It may be that the code may run if I have the Live Editor open to the code, but would not run if a different script were to call the script. This seems like an odd requirement that may be inconvenient in some circumstances, but I'm glad it wasn't too complicated a fix!
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Verification, Validation, and Test 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!