Main Content

Solution Submission Guide

MATLAB® Grader™ coding problems are created by your instructor and are intended to assess your MATLAB coding skills.

  • Each coding problem contains the following elements:

    • A problem description written by your instructor, containing details about the problem to be solved and usually including specifics about what the solution must contain

    • A problem solving area, where you can enter your code

    • Actions for save, reset, run, run pretest (if pretests are provided), and submit

    • Assessment results and feedback

To learn more about pretests, sizing limitations, multiple submissions, and other factors to consider when coding your solution, see Solution Guide.

For information about accessing your coding problems, see Access Your Courses and Assignments in MATLAB Grader. If you are enrolled in an LMS, contact your instructor.

Solution Guide

To get started, select the platform where you want to code your solution:

While you are working on your solution, keep in mind the information in this section about pretests, sizing limitations, multiple submissions, and other factors to consider when coding your solution.

Pretests

Pretests are assessments provided by your instructor that you can run without submitting your solution for grading. They are different from regular assessments in the following ways:

  • When you run pretests before submitting, the pretest results are not recorded in the gradebook.

  • Running pretests does not count against a submission limit.

  • You can view the assessment code in a pretest, as well as the output generated by that code.

Note that when you submit your solution, pretests are also run and are treated the same as regular assessments, and therefore contribute to the final grade.

When you submit your solution, pretest assessments are also run and are treated the same as regular assessments, and do contribute to the final grade.

Run any available pretests before submitting your solution. Pretest results can provide valuable feedback and can be used to determine if your solution is on the right path before you submit it.

Test your solution before submitting it by clicking Run Pretest. Note that the option to run pretests appears only if your instructor has created pretests for a particular problem.

Check the pretest assessment results. Each test that the solution failed includes an error message that indicates what caused the failure. Solutions that passed have a green check mark.

Note

Pretests do not count as a submission. You must still submit your solution, even if all assessments are pretests.

Execution Time Limit

MATLAB Grader enforces an execution time limit of 60 seconds. The clock starts when you click Run or Submit, and stops when the output or assessment results are displayed to you. In MATLAB Online™, the execution time limit is enforced only when you submit your solution.

You can get an estimate of the time required to execute your solution by running it using MATLAB Online, as the computational environment used to execute the MATLAB code is most similar to what is used by MATLAB Grader.

When you submit your solution, MATLAB Grader runs the instructor’s solution every time it runs your solution. For script-type problems, your solution is run only one time. In function-type problems, your solution may be run in every assessment. The total execution time includes running both solutions plus the assessments. This time must not exceed 60 seconds.

Note

You might find that you can see the output of your code when you click Run Script or Run Function, but when you submit, you get the error message "The server timed out while running and assessing your solution." This error is due to the additional execution time needed to evaluate the correctness of your solution. Look for ways to reduce the runtime of your solution.

If you get a warning that the server timed out, your solution took too long to run. Server time out errors are typically the result of errors in your solution, inefficient code, or excessive output printing to the screen. A viable solution does exist, so look for ways to reduce the runtime of your solution.

Submission Limit

Your instructor can specify a submission limit, which is the maximum number of times you can submit a solution. The Submit button indicates the number of attempts and the submission limit.

If your instructor does not specify a submission limit, you can submit as many solutions as you want.

Image showing the submit button with attempt 2 of 3

When there is only one submission left, you are asked to confirm the final submission. The Submit button becomes disabled after you have used all attempts.

Late Solutions

MATLAB Grader allows you to continue to submit solutions to problems after the assignment due date.

Your instructor may impose a due date for the assigned problems. They may allow late submissions. Consult your instructor on how late submissions are handled.

Assessment Results

MATLAB Grader evaluates each solution against the assessments that your instructor created. If your solution passes all of the tests for this problem, MATLAB Grader marks the solution as correct. If your solution fails one or more tests, it marks the solution as incorrect.

Each failed solution includes an error message that indicates what caused the failure, as well as any additional feedback your instructor provided. Solutions that pass have a green check mark.

Solution Size (MATLAB Grader Courses Only)

MATLAB Grader calculates solution size using a node-count algorithm. Size is not a factor in the solution score; therefore, do not consider it as feedback about the quality of your solution. However, similar code has a similar size. You can therefore use size to gauge if your approach is similar to or different from the submissions made by others.

Previous Solutions

When working on an improvement for your solution, you might find it helpful to view other solutions you have already submitted for comparison.

In MATLAB Grader or in your LMS, click My Solutions to see all solutions you have submitted for the problem you are on. If you are working in MATLAB Online, return to MATLAB Grader first.

Related Topics