This is a very simple function that creates a 2D logical matrix with a checkerboard pattern. It's similar to the true or false functions.
% Syntax
tf = checker(N)
tf = checker([M N])
tf = checker(M,N)
% Description
tf = checker(N) creates an NxN checkerboard pattern.
tf = checker([M N]) creates an MxN checkerboard pattern.
tf = checker(M,N) creates an MxN checkerboard pattern.
% Example
imagesc(checker(5))
Cite As
Chad Greene (2026). checker (https://uk.mathworks.com/matlabcentral/fileexchange/72400-checker), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2019a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Periodic Waveform Generation in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
|
