- Compare the variable they are meant to write to a file to the corresponding reference solution variable
- Assess whether expected write function is present in their solution
How to grade output files in MATLAB Grader?
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to be able to have students generate output files in MATLAB grader (like .txt files or .xlsx files) and be graded on whether they match the solution .txt file or .xlsx file. When running the reference function and the student function, all the variable outputs are collected as usual, but there was no file output (like the files disappeared!). For some reason, plots work fine, but being able to work with outputting and comparing files would be great and would be beneficial to the students.
3 Commenti
Cris LaPierre
il 14 Feb 2022
Modificato: Cris LaPierre
il 15 Feb 2022
Unfortunately, visdiff will not work in MATLAB Grader. Therefore, I think I would pursue an approach that loads their file to a variable and compares it to a reference variable.
However, there are challenges in ensuring MATLAB Grader is doing what you think it is doing when it comes to working with files. What you need to keep in mind is that the reference solution and learner solution are writing their files to the same place. This has some implications on how you need to design the problem so that
- the learner file doesn't replace the reference file
- the reference file doesn't serve as the learner's file if their code doesn't create a file
- the problem can be saved as final
There are several paths forward, but which to recommend depends on the specifics of the problem. It may be helfpul to work with your institution's customer success engineer to design your solution. If you con't know who that is, you can contact support.
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!