Creating a seperate high score file for Matlab game
조회 수: 4 (최근 30일)
이전 댓글 표시
(Homework)
Hello, I am trying to create a seperate highscore file for a game but am not sure which data type to use. It was said to not use an "M" file so what are my next best options? The highscore file needs to include the name and score of the winners of my game. Thanks!
댓글 수: 0
답변 (1개)
Rik
2019년 11월 26일
There are several options to store data. If you need to store it in a file you can either use a mat file (with the save and load functions), or use a text file. If you are not required to use an explicit file you can also store it internally to Matlab with getpref and setpref.
I would suggest using a mat file in this case.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!