在使用Matlab Grader时,系统检测我的答案时显示Unable to resolve the name‘referenceVariables.y1’(这是一个系统内部的变量)
2 ビュー (過去 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!