在使用Matlab Grader时,系统检测我的答案时显示Unable to resolve the name‘referenceVariables.y1’(这是一个系统内部的变量)
3 次查看(过去 30 天)
显示 更早的评论
我在使用Matlab Grader时,系统要对我的变量正确性用assessVariableEqual进行检验。
代码输入后系统显示Unable to resolve the name‘referenceVariables.y1’(这是一个系统内部的变量)。
我想问一下这是什么原因导致的?该如何解决?
When I use Matlab Grader, the system will test the correctness of my variables with assessVariableEqual.
After input, the system displays Unable to resolve the name 'referenceVariables.y1' (an internal variable).
I would like to ask what is the cause of this? How to solve it?
0 个评论
回答(1 个)
Swaraj
2023-4-6
Hi,
I understand that you are getting an error “Unable to resolve the name 'referenceVariables.y1'”. I tried to understand the reasons for this error.
The error message “Unable to resolve the name 'referenceVariables.y1'” shows up when you are trying to use a variable which is not yet defined. Make sure you are using the exact name of the variable as intended. Also take care of the scope rules of the variable defined. Like scenario where you have defined a variable in an “if” condition and using it after the “if” condition ends. Here, if the condition fails, the variable will not be defined.
To understand more, you can go through the following answer.
I hope it helps.
Thanks!!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Communications Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!