Learner ID in MATLAB-Grader?

2 visualizaciones (últimos 30 días)
Karoline Peters
Karoline Peters el 5 de Feb. de 2022
Comentada: Alfonso da Silva Saavedra el 30 de Dic. de 2022
Does Matlab-Grader has access to an a Learner ID or Solution ID in the script?
I would like to use this ID as the seed in rng() in order to create individual variables for each Learner.
  1 comentario
Alfonso da Silva Saavedra
Alfonso da Silva Saavedra el 30 de Dic. de 2022
Hi! I've done it. Take a look to this example: https://github.com/alfonsovng/matlab-grader-utils/tree/main/examples/3-script-problem-personalized-values-image

Iniciar sesión para comentar.

Respuestas (1)

Cris LaPierre
Cris LaPierre el 5 de Feb. de 2022
It does not. However, you can use random number generating functions to define variables in the reference and learner solutions without needing to set rng. The reference and learner workspaces share the same seed, so generate the same random numbers. This will allow you to create randomly generated variables every time a solution is run or submitted.
For an example, look at these problems in the Getting Started with MATLAB sample collection
  • Coordinate Transformations - Navigating a robot
  • Finding a signal through the noise
You can find this collection of problems on the Add Problem screen in MATLAB Grader
You can copy problems from this collection into yout collection
  2 comentarios
Karoline Peters
Karoline Peters el 5 de Feb. de 2022
Thank you for your answer. But is it possible to get the same random numbers for each Learner after the solution is run. So that every Learner has their own variables?
Cris LaPierre
Cris LaPierre el 5 de Feb. de 2022
Editada: Cris LaPierre el 5 de Feb. de 2022
There is no built-in way to generate learner-specific variables, meaning one that is unique to a specific user and does not change every time the code executes.

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by