Hi guys, I am creating 3d models but when I am doing so I noticed that matlab is not running code analysis:
I do not have space bar in the names, yet this error still occurs.
May I know what is going on? Thanks!

 채택된 답변

Walter Roberson
Walter Roberson 2022년 12월 4일

1 개 추천

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

Miles Hao Peng Su
Miles Hao Peng Su 2022년 12월 4일
I see! thank you!
Benjamin
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개)

카테고리

도움말 센터File Exchange에서 Modeling에 대해 자세히 알아보기

태그

질문:

2022년 12월 4일

댓글:

2023년 12월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by