Main Content

Submit Solution in MATLAB Grader

Use the MATLAB® Grader™ UI to solve a coding problem and submit it for grading. The MATLAB Grader UI provides a subset of MATLAB functionality required for solving the coding problem. Toolboxes required as part of the solution are included.

Code, Debug and Analyze, and Submit Your Solution

  1. Open a coding problem in MATLAB Grader.

  2. Code your solution in the script or function code boxes.

    • The instructor has written a description for the problem and provided guidance on how you are to solve it.

    • Lines with a gray background have been locked by your instructor, meaning you cannot edit them.

    • If you are writing a function solution:

      • You must use the function name provided by the instructor so that MATLAB Grader can assess your solution.

      • Your instructor may have provided the code to call your function. If not, you need to add this code to the Code to Call Your Function area before you can test your solution.

  3. Run code and check your output by clicking Run Script or Run Function. Outputs, if any, appear immediately below the button.

    When you prequalify your solution, make sure your code does not exceed the execution time limit. Solutions that exceed the time limit fail when you attempt to submit them. For more information, see Execution Time Limit).

  4. Run pretests if your instructor has provided them and review any pretest assessment results. You can learn about pretests in the topic Pretests.

  5. Submit your solution.

    Review the results of assessments that were run during submission.

    You must submit your solution for credit or grading, even if there are no assessments.

    • To keep working on the problem, click Fix This Solution.

    • To see other attempts you have made at solving this problem, go to the top of the page and then click View my Solutions.

MATLAB Grader allows you to submit late solutions (see Late Solutions). Consult with your instructor on how late submissions are handled.

For more information about factors that can affect your submission, see the Solution Guide.

Save Work in Progress or Reset Template

If you navigate away from a problem and then return, the problem reloads with the last saved code. Code is automatically saved when you submit a solution. To save your work without submitting it, click Save.

To revert the code area back to its original state, click Reset.

Review Assessment Results

When you submit a solution, MATLAB Grader evaluates it against the assessments that your instructor created for this problem, including pretests.

  • If your solution passes all of the tests for this problem, MATLAB Grader marks the solution as correct. Tests that your solution passed have a green check mark.

  • If your solution fails a test, MATLAB Grader marks the solution as incorrect. Tests that your solution failed have a red X. Each test the solution failed includes an error message that indicates what caused the failure.

Image shows a list of tests and test results

Related Topics