How to assess solutions with multiple correct answers in MATLAB Grader?

조회 수: 11 (최근 30일)
I recently received the following question about Grader assessments:
"I wasn't able to test a variable when there are two possible answers. So we have situations where depending on what assumptions the student makes they can have two possible correct answers for a variable. Both are correct as you can assume either way but matlab grader would only let me have one variable as correct."

채택된 답변

Francesco Ciriello
Francesco Ciriello 2020년 8월 13일
You could consider using MATLAB code to develop a custom Test. The assessment code can create new variables that you could test with conditional statements. For example:
  댓글 수: 1
Cris LaPierre
Cris LaPierre 2020년 8월 13일
One caution - this approach does not incorporate any tolerance, though it could be modified so it does.
solutionChecker = abs(abs(x)-2) < 0.0001;
Still, if the student does get this problem wrong, they will get a default error message that variable solutionChecker has an incorrect value. This may cause some alarm on their part since their solution does not contain that variable.
To avoid having to worry about these issues, I would probably recommend using a try-catch. A couple examples can be seen here (checking 2 common values of an intermediate variable) and here (using for or while loop in solution, but not both). For this example it could be
try
assessVariableEqual('x', 2);
catch
assessVariableEqual('x', -2);
end
Now default tolerances are incorporated, and the student variable name is used in the default error message.
Acknowledging that this is just an example, I have one final observation. The test description (Is x == +/-2?) is giving away the answer to students. Better would be a description like "Is x correct?".

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

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  원격 교육 커뮤니티

카테고리

Help CenterFile Exchange에서 Create or Copy Coding Problems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by