- The use of eval(), assignin(), or any of their cousins
- Calling scripts within a function or script
- Loading data from mat files without assigning it to a variable
- Dynamically named variables
- Using command form syntax: e.g. clear z as opposed to clear('z')
Transparency violation error only in new desktop and when a breakpoint is set in another function.
4 次查看(过去 30 天)
显示 更早的评论
I'm getting the transparency violation error only when running the new deskotp and only when I have a breakpoint in a function called from another function. Everything runs when there is no breakpoint and I can debug when I stop using the new desktop. What is going on here?
0 个评论
采纳的回答
Adam Danz
2025-3-11
Transparency in MATLAB code refers to MATLAB's ability to identify all variables by scanning the code while ignoring comments, character vectors or strings. Transparent access is necessary in contexts like function argument validation and parallel computing.
To be transparent, variable names must be explicitly referred. Transparency violations occur when variables appear out of nowhere. Some examples:
If you have access to the R2025a documentation, search for "Transparency in MATLAB code" for more information.
2 个评论
Adam Danz
2025-3-11
I just saw you're using R2024b. I thought you were using the R2025a beta desktop.
There were some false-positive transparency violation bugs that were fixed in update 3 of R2024b, I believe (I don't work on that team). I can't speak to any changes in R2025a at the moment.
If you're using the lastest update and find unexpected errors on this topic, please contact tech support and include instructions how to reproduce the error.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Entering Commands 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!