Is it possible to grade Code in Live Editor

8 views (last 30 days)
I'm currently remaking a signals and controls MATLAB module in MATLAB Live Editor to make the course more interactive etc. however I would like students code to be graded at certain points, I have seen the MATLAB grader but I want to keep everything in Live Editor, is there a way to incorpororate this grading into live editor? If not I have thought of making my own separate functions that upon a button press check the value of certain variables, if you can think of a better way please let me know!

Accepted Answer

Cris LaPierre
Cris LaPierre on 8 Jul 2021
It is always possible, it just depends on what sort of experience you want to create for your learners.
MATLAB Grader does not support interactive code, so if that is the experience you are looking to create, you are better sticking to live scripts. However, in a live script, you will not have access to the assessment functions grader uses. You will need to come up with your own assessment code and incorporate it into your live script.
Your students will need to be able to run your assessment code in order for the grading to work. That means the assessment code will need to be incorporated into the live script itself (so students will be able to see it, plus it may make the script more difficult to read/navigate), or it can be placed into separate script or function files that the live script calls.
Off the top of my head, I would probably do the following.
  1. Create the live scripts to just contain the code I want my students to see
  2. Use breaks to control the execution of code
  3. Create p-coded scripts or functions for evaluating the students work
  4. Organize the live script(s) and grading file(s) into a folder structure in MATLAB Drive
  5. Distribute the live script to students (I would use a shared link in MATLAB Drive so the file is already in their MATLAB Online session)
You can learn more about creating, sharing, and running live scripts in MATLAB Online in our Teaching with MATLAB self-paced course.
The biggest challenge may be if you want to record their grades. MATLAB does not provide an automatic way to capture these grades. Any solution would have to be created using custom code.

More Answers (0)

Categories

Find more on Install Products in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!