Help with writing Assessments for Script-Based Learner Solutions

I am very new to matlab Grader.
For script-based solutions, to create assessments with
  • MATLAB Code — Write the assessment using MATLAB® code.
I do not know how to write this code. Could you recommend some documentation that may help me with this, please
I am looking at example Matlab is Awesome (simple fprintf to file) from Introduction to Programming, Input/Output

 Réponse acceptée

Cris LaPierre
Cris LaPierre le 19 Fév 2021
Modifié(e) : Cris LaPierre le 19 Fév 2021
I would suggest looking at the Assessment section of the Add Problem documentation page.
If you have not done so already, I would also suggest going through the Teaching with MATLAB training (ch 6 covers MATLAB Grader).
You may find some of the Getting Started with MATLAB Grader example problems helpful. The following examples use MATLAB Code assessments:
  • Write a function to calculate normalized sinc
  • Symbolic Taylor expansion
  • Definite integration using Simpson’s Rule
  • Analysis of stress-strain data
However, if you just want to see if a variable a student creates contains the same value(s) as a reference variable, you can just use the Variable equals reference solution test type from the drop down menu.

5 commentaires

Teresa Perdicoulis
Teresa Perdicoulis le 20 Fév 2021
Déplacé(e) : Cris LaPierre le 14 Juin 2023
Dear Cris,
Thank you so much for your answer.
I am going to try to follow your guidelines.
Best greetings and wishes of a good weekend.
Teresa
Teresa Perdicoulis
Teresa Perdicoulis le 26 Mar 2021
Déplacé(e) : Cris LaPierre le 14 Juin 2023
Dear Cris,
I am having difficulty in designing the questions to assess the knowledge of the students about tables. Could you please suggest me some resource that might help?
Best Greetings,
Teresa
Cris LaPierre
Cris LaPierre le 26 Mar 2021
Déplacé(e) : Cris LaPierre le 14 Juin 2023
You can assess correctness using the "Variable equals reference solution" drop down test. However, custom assessments are needed to assess something specific. What is it you are trying to assess?
Teresa Perdicoulis
Teresa Perdicoulis le 29 Mar 2021
Déplacé(e) : Cris LaPierre le 14 Juin 2023
Thank you. I only manage to assess the variable that is the name of the table and not the columns. For instance T.VelocidadeAr I cannot acess.
What specifically about that column do you want to assess?
You can use "Variable equals reference solution" to check that the Learner's table T has the same variable names, data types, size, and values as T in the reference solution (or referenceVariables.T). However, if anything is different, students would get the message 'Variable T has an incorrect value.'.
If you want to just assess that column specifically, you would have to use a MATLAB Code assessment. The simplest approach would be to extract that column from both the learner and reference solutions and compare the values using assessVariableEqual.
VelocidadeAr = T.VelocidadeAr;
assessVariableEqual('VelocidadeAr',referenceVariables.T.VelocidadeAr)
You can also use the assert function instead of assessVariableEqual to create your own assessment test. When writing your own assessent test, you should follow the suggestions provided in the following post

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Networks dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by