Why the underscore is red?
9 次查看(过去 30 天)
显示 更早的评论
When typing, Why the underscore is in red and i always fail to call a variable due to this problem? How can i fix it?
0 个评论
回答(1 个)
Star Strider
2019-5-27
That usually means that the underscore you are using is not part of the ASCII character set MATLAB recognises.
The correct underscore is:
undscr = char(95);
and the minus sign or hyphen is:
hyphn = char(45);
2 个评论
Star Strider
2019-5-27
Without seeing your code, I don’t either.
However, it is likely that you either left off a closing parenthesis or square bracket or curly bracket, or some other error that caused the mlint or related functions to detect an error in the previous line. Be certain everything is correct iun the previous line, and the problem will likely not recur.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!