Notes
This function is in beta test. Please help improve it in the issues
here.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
MATLAB is selecting SOFTWARE OPENGL rendering. < M A T L A B (R) > Copyright 1984-2021 The MathWorks, Inc. R2021a (9.10.0.1602886) 64-bit (glnxa64) February 17, 2021 For online documentation, see https://www.mathworks.com/support For product information, visit www.mathworks.com. >> [Warning: Unable to create preferences folder in /.matlab/R2021a. A system error has occurred. Using a temporary preferences folder for this MATLAB session. See the <a href="matlab: helpview([docroot '/matlab/helptargets.map'],'matlabenvironment_prefdir_location')">preferences documentation</a> for more details.] >> >> Your output.txt:
JOJ Answer
MATLAB is selecting SOFTWARE OPENGL rendering. < M A T L A B (R) > Copyright 1984-2021 The MathWorks, Inc. R2021a (9.10.0.1602886) 64-bit (glnxa64) February 17, 2021 For online documentation, see https://www.mathworks.com/support For product information, visit www.mathworks.com. Your output.txt: Start at location row: 2, column: 5 Treasure at location row: 3, column: 5 Treasure at location row: 6, column: 8 Treasure at location row: 3, column: 4 Treasure at location row: 10, column: 4 Treasure at location row: 10, column: 5 Treasure at location row: 9, column: 3 Treasure at location row: 8, column: 3 Treasure at location row: 1, column: 4 8 Treasure(s) found in all.