I'm trying to create 3x3 of 3x3 tic tac toe boards for a game of tic tac toe squared using the rules found below. So far I've coded everything for a single 3x3 game using a cell array that records 0's and X's. My question is this: How do I make an array of arrays or arrange 9 cell arrays in a 3x3 pattern?

Antworten (1)

Sean de Wolski
Sean de Wolski am 14 Okt. 2013
Bearbeitet: Sean de Wolski am 14 Okt. 2013

1 Stimme

C = cell(3,3)
?
More per comments
The simplest way I can think of to do this is to use cellfun
C = cellfun(@(x)cell(3,3),cell(3,3),'UniformOutput',false)

2 Kommentare

Brian Catozzi
Brian Catozzi am 14 Okt. 2013
Right, I'be been using C = cell(3,3) which gives me a 3x3 cell array. I want to take 9 of those C = cell(3,3) cell arrays and arrange them in a 3x3 fashion creating one huge array 9x9 in size
C = cell(3,3) C = cell(3,3) C = cell(3,3)
C = cell(3,3) C = cell(3,3) C = cell(3,3)
C = cell(3,3) C = cell(3,3) C = cell(3,3)
something like this
Sean de Wolski
Sean de Wolski am 14 Okt. 2013
See more

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Number games finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 14 Okt. 2013

Bearbeitet:

am 14 Okt. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by