How to create a gird on MATLAB?

I need to create a grid that looks like the one in the link and I have tried everything I can think of but I cannot figure it out.
The gird is the one from the game Battleship.
Thank you all so much!

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 8 Mar 2013
Edited: Azzi Abdelmalek on 8 Mar 2013
You can use uitable
f = figure('Position',[ 100 123 785 202]);
dat = cell(10)
columnname = num2cell(1:10)
rowname={'A';'B';'C';'D';'E';'F';'G';'H';'I';'J'}
%columnformat = {'numeric', 'bank', 'logical', {'Fixed' 'Adjustable'}};
%columneditable = [false false true true];
t = uitable('Units','normalized','Position',[0 0 1 1], 'Data', dat,...
'RowName',rowname,'ColumnName', columnname)
set(gcf,'menubar','none')

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

Asked:

on 8 Mar 2013

Community Treasure Hunt

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

Start Hunting!