Recursive Sudoku Solver in MATLAB

Version 1.2.0.0 (1.76 KB) by Josip
A Sudoku solver that takes a (9x9) matrix and outputs the solved matrix.
427 Downloads
Updated 14 Nov 2013

View License

This solves a Sudoku puzzle (given that it is initially valid) recursively. While it isn't the fastest, I think it's nice for 18 lines worth of code. I made another one that's faster, but it's substantially longer.

Cite As

Josip (2024). Recursive Sudoku Solver in MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/44272-recursive-sudoku-solver-in-matlab), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Sudoku in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.2.0.0

I had a look at why it was not performing as fast as I thought, turns out that setxoring is slow. So I tried to eliminate this, and it made the code ~14x faster! I've left the old code in for reference.

1.1.0.0

Just updated the title.