Using a learner's variable value in the MATLAB grader reference solution

조회 수: 19 (최근 30일)
Simon Shaw
Simon Shaw 2020년 5월 21일
댓글: Alfonso da Silva Saavedra 2022년 12월 30일
I would like to use MATLAB grader for questions where each student in a cohort uses their own numerical values for named variables. I would then like to access their specific value in the reference solution so as to mark their individualised submission. For example:
Question: calculate and provide your unique value of u (using some algorithm that is provided offline), and give the value of m = 1/u
Learner Template:
u =
m=
Reference template
user_u = ????
m = 1/user_u
I am looking for what to put into ???? above. Can anybody help with this? Note that randomized data is not sufficient for my need unless the seed in rng(seed) can be provided by the offline algorithm and shared across the learner and reference spaces (but this is pretty much equivalent to the question above).
  댓글 수: 1
Alfonso da Silva Saavedra
Alfonso da Silva Saavedra 2022년 12월 30일
What I do is parse, in th reference solution, the `solution.m` file, that it's the name of the file that contains the script of the student.

댓글을 달려면 로그인하십시오.

답변 (2개)

Cris LaPierre
Cris LaPierre 2020년 5월 21일
편집: Cris LaPierre 2020년 5월 21일
In MATLAB Grader, the reference and learner solutions share the same seed. Therefore, it is possible to create a problem that will generate a new number every time it is run, but the same number for the reference and learner solutions. For more details, see my post here.
  댓글 수: 5
Jeff Alderson
Jeff Alderson 2020년 7월 13일
By design, MATLAB Grader solutions do not have access to personally identifiable information about students.
If you were to provide a P-coded function that accepts an input in the form of a Student ID that the learner provides in their solution, you could use that ID as an index to look up data from another P-coded file and return any variable you wish. You could reuse such a function in multiple problems, and include a note in your problem description that the student must provide their own Student ID as an input to your custom function at the start of their solution.
There may be another MATLAB Answers article that demonstrates this, and I will link back to it when I can find it.
Jeff Alderson
Jeff Alderson 2020년 7월 13일
Otherwise, I will take a note of the enhancement request to provide individualized data for learners.

댓글을 달려면 로그인하십시오.


Jeff Alderson
Jeff Alderson 2020년 7월 13일
By design, MATLAB Grader solutions do not have access to personally identifiable information about students.
If you were to provide a P-coded function that accepts an input in the form of a Student ID that the learner provides in their solution, you could use that ID as an index to look up data from another P-coded file and return any variable you wish. You could reuse such a function in multiple problems, and include a note in your problem description that the student must provide their own Student ID as an input to your custom function at the start of their solution.

커뮤니티

더 많은 답변 보기:  원격 교육 커뮤니티

카테고리

Help CenterFile Exchange에서 Create or Copy Coding Problems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by