i’m looking for advice to see if anyone knows how to get this working…
i have an number of player names which i’d like to convert in to numbers to store in a list.
for k = 1:player_name;
pn = sprintf('Enter the name of player %d', k);
inputdlg(pn);
end
for example, i’d like to retrieve the name of player 2.
i was thinking something like:
player1 = str2num(pn %d, k);
but i can’t get this working…
any ideas greatly recieved!
Here is my solution to your problem:
now to access player 1’s name