MATLAB Answers

How do I call the reference solution in Cody?

1 view (last 30 days)
George Bittar
George Bittar on 8 Jun 2021
Commented: David Hill on 8 Jun 2021
I created a problem in Cody that approximates e. To test the user's solution, I compare their solution to e. What I want to do instead is compare the user's solution to my reference solution. The question is how do I call the reference solution in the test suite?
This is currently my test suite.
sol=exp(1);
y_correct = playgame();
assessVariableEqual('y_correct',sol);
  1 Comment
David Hill
David Hill on 8 Jun 2021
I don't think you can. Just place the reference solution into sol.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by