How can I write a function called checkerboard
Ältere Kommentare anzeigen
How can I write a function called checkerboard that takes as input two positive integer scalars, n and m, in that order. The function must create and return board, which is an n-‐by-‐m matrix. Every element of board is either 0 or 1. The first element, board(1,1) is 1. No direct neighbors in the matrix, vertically or horizontally, can be equal. That is, a 1 element cannot have 1 immediately preceding or following it in the same row or column.
5 Kommentare
Jan
am 30 Okt. 2015
This sounds like a homework question. So please show us, what you have tried so far and ask a specific question.
Surfnerd
am 30 Okt. 2015
Bearbeitet: Image Analyst
am 30 Okt. 2015
Image Analyst
am 30 Okt. 2015
Congratulations - you did it yourself. Do you have any questions?
Adam
am 30 Okt. 2015
So what is the problem?
Surfnerd
am 31 Okt. 2015
Antworten (0)
Kategorien
Mehr zu Raspberry Pi Hardware finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!