How can I access a record of the Command Window using MATLAB Grader?
Show older comments
I have asked learners to write a function that displays some messages to the Command Window.
In MATLAB I know I can use the diary function to access a record of the Command Window text, like this:
% Start the diary
diary CommandLog
% run the learner solution here
% Access the log then assess if correct
printOuts = fileread('CommandLog')
For some reason, this comes up as empty char in MATLAB Grader. Is there an alterative?
2 Comments
Cris LaPierre
on 17 Apr 2023
Could you share an example? How many outputs does their function create? How are they created?
IFM
on 18 Apr 2023
Accepted Answer
More Answers (0)
Communities
More Answers in the Distance Learning Community
Categories
Find more on Use Content in an LMS Course in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!