Why the assessment shows the keyword not presented however it is in the code in the MATLAB grader?

조회 수: 2 (최근 30일)
In MATLAB Grader, I set up the reference solution, added two assessment, one to check the keywords' presence and the other check the results. Then I run the same answer code in the learner's view and submit the answer, the assessment showed that the keywords missing and results wrong, which is not the case by the code nor the results. What happened wrong?
e.g. Code: z=sort(x,'descend')
In Assessment: 1. check if keywords used: sort, descend
2. check if the variable z is the same as in the reference solution
Even if the code are correct and z is correct, the auto-assessment shows "descend" is missing and the result is not correct.

답변 (1개)

Cris LaPierre
Cris LaPierre 2022년 3월 28일
편집: Cris LaPierre 2022년 3월 28일
The reason is that descend is not a function or keyword. It is an input argument to the sort function.
exist('descend')
ans = 0
iskeyword('descend')
ans = logical
0
  댓글 수: 4

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Use Content in an LMS Course에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by