MATLAB: My student’s submission in MATLAB Grader is correct. Why is it being marked incorrect?​

assessment;assignmentgraded;graderincorrectmarked;MATLABwrong

My student’s submission in MATLAB Grader is correct.  Why is it being marked incorrect?​

Best Answer

There are several common reasons why an assessment may be marked incorrect even if the relevant code in the student solution is correct.
  1. The student solution contains a syntax error. All assessments are marked incorrect and the syntax error message is shown as feedback in each assessment.  Students should first correct any syntax errors and then resubmit their solution.
  2. For numeric values, the tolerances may be inappropriate for the desired correct solution. Default tolerances are ±0.001 relative or ±0.0001 absolute. When the correct solution is very small, the answer may never be marked incorrect. When it is very large, small differences in how the calculation is done could result in a correct answer being marked incorrect.
  3. Inconsistencies between the problem statement, the reference solution, and/or the learner template. Often, variables in the student solution are compared to variables in the reference solution. Verify that the reference solution is consistent with the problem statement, and that the learner template, if provided, is consistent with the reference solution. Sometimes in the editing process the problem statement may be updated but the reference solution overlooked, or the reference solution may have been updated but not the learner template.
  4. Comparing a variable in the learner solution to itself instead of the corresponding variable in the reference solution. If using custom assessment code and comparing variables using the assessVariableEqual function, be sure to refer to reference variables using the structure referenceVariables.varName
  5. 'clear' or 'clear all' commands in submission can remove reference variables for the test cases. Make sure that the student is not using 'clear' command in the submission. As a workaround, include "assessFunctionAbsence('clear','Feedback','Do not use clear in your solution')" while creating questions.
If you have gone through the list of common issues mentioned above and are still having issues, please contact MathWorks Support.