How can I store user input
Afficher commentaires plus anciens
player_x = 1;
r = input('select a row');
c = input('select a column');
tictactoe_board(r,c) = player_x
Réponses (1)
KALYAN ACHARJYA
le 2 Déc 2021
Modifié(e) : KALYAN ACHARJYA
le 2 Déc 2021
0 votes
There are multiple ways (Any One)
- Store the r and c variable data in text file or other files, like excel (see save function)
- Easiest: diary on, display the user data in command window, once done diary off, it save all reflects data in command window in one text file.
If user data has multiple repetitions, prefer to save in an array, then save the array variable in text file or excel.
Hope it Helps!
Catégories
En savoir plus sur Strategy & Logic dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!