How can I store user input

26 visualizaciones (últimos 30 días)
John Laple
John Laple el 2 de Dic. de 2021
Editada: KALYAN ACHARJYA el 2 de Dic. de 2021
player_x = 1;
r = input('select a row');
c = input('select a column');
tictactoe_board(r,c) = player_x

Respuestas (1)

KALYAN ACHARJYA
KALYAN ACHARJYA el 2 de Dic. de 2021
Editada: KALYAN ACHARJYA el 2 de Dic. de 2021
There are multiple ways (Any One)
  1. Store the r and c variable data in text file or other files, like excel (see save function)
  2. 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!

Categorías

Más información sobre Strategy & Logic en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by