MATLAB graders issues, i want to use one funtion from another problem

6 次查看(过去 30 天)
I am using MATLAB graders. In some assignments we want students to write a function which they will use in a following script. I can see where to add the functions file, but can't find it to include.

采纳的回答

Cris LaPierre
Cris LaPierre 2024-2-18
编辑:Cris LaPierre 2024-2-18
Each problem in MATLAB Grader is independent of the other problems. You can add external files to a problem for learners to use in their solutionk but it is not possible to link to their solution from a different problem.
I think the most robust approach here would be to have the students still write the function in one problem, but when it comes time to use the function in this problem, I would attach a p-coded function file. That way, the problem about the function can focus on assessing the function, and the problem that uses the function can focus on if it is used correctly knowing that the attached function file works correctly. This also allows learners who can't figure out how to create the function correctly to move on with the assignment.
If you truly want them to use their version of the function, then the only solution is to have your learners copy their function code and paste it in the new problem at the bottom of the script as a local funcion. See here.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Entering Commands 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by