10 by 10 matrix grid
显示 更早的评论
Hi all
Im trying to make a battleship game and as a start i need to make a 10*10 matrix grid with (letter,number) coordinates. Ex: A6,C3,D4
That is, i need the first column of every row to be a letter from (a-j) and the the rest to be numbers with 1 on the top and 10 at the bottom
How do i do this?
thanks in advance
2 个评论
David Hill
2020-3-5
I would just set up a matrix of zeros
BSgrid=zeros(10);
Then 'A6' index can just be converted to (1 6) to index into the matrix.
Tarek Eid
2020-3-10
回答(1 个)
Stephen23
2020-3-5
1 个投票
类别
在 帮助中心 和 File Exchange 中查找有关 Just for fun 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!