Create Script-Based Problems
Write a problem that you want learners to solve using a script. The following procedure walks you through all the steps necessary to create a problem; if you need additional help, click or see Example of a Script-Based Problem.
At any time, you can click Choose Different Problem to abandon the draft and return to Add Problem to make a new selection.
Create a title and detailed problem description for the learner. You can include formatted text, equations, links, and images.
Clearly define the number and type of input variables and the number and type of expected outputs. Be specific about the types of values or measurements to be used (for example, degrees in Celsius or metric values).
In Files Referenced, provide data and code files that the reference solution, learner solution, and assessment tests can use.
Set Problem Type to Script.
The Reference Solution is the instructor’s solution. The learner cannot see this solution. You can use a reference solution to test your assessments.
If you want to help learners with some of the solution, fill out the Learner Template. This template contains code that you provide to learners to guide them in creating a solution. You decide how much code to provide to help get them started.
To see the actual formatting of your content, click Learner Preview. The preview area displays the view that your learners see.
Click Save as Draft. Learners cannot see the problem while it is in Draft mode. You can continue developing this problem while it is in draft mode.
Write an assessment for the problem.
Click Save as Final when the problem is complete. Or, click Save as Draft continue working on the problem before publishing it.
If you want to remove a problem from learner view after publishing it, click Set to Draft.
Example of a Script-Based Problem
Create a problem for learners wherein they must add a number to all elements of a vector and plot the results in a grid. While you are authoring a problem, click Save as Draft at any time to save the work you have done so far.
Create title and problem description. Use the toolbar to format text.
Leave Files Referenced empty.
Set Problem Type to Script.
Fill out the Reference Solution with MATLAB® code that demonstrates your solution to the problem.
MATLAB Grader™ uses the reference solution to fill out the Learner Template. You can remove any code you want the learners to provide, for example, variable values or computations.
The following example shows an array with preassigned values (note that the line of code cannot be changed, indicated by the lock icon) and two comments with instructions. The learner is left to fill in the necessary code.
To lock lines of code you do not want the learner to change, click the lock icon. You can click Learner Preview at any time to see what your learners will see.
Write assessment tests for the problem. See Write Assessments for Script-Based Learner Solutions.
When you have finished creating this problem, click Save as Final.