Solve Magic Square
版本 1.1.0.0 (3.8 KB) 作者:
Bastian Tietjen
Find all combinations of entries in a matrix which sum equals a certain number up to eps precision.
Find all combinations of entries in a matrix (or vector) which sum equals a certain number. In addition to the matrix, the length of the combination (two entries, three entries, ...) as well as the numerical value to match can be supplied. Works as well on vectors.
Returns the combination and the indices of the combinations.
Since it uses brute force to try all possible combinations the time strongly depends on the size of the matrix and the length of the combination.
引用格式
Bastian Tietjen (2024). Solve Magic Square (https://www.mathworks.com/matlabcentral/fileexchange/41063-solve-magic-square), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2010b
兼容任何版本
平台兼容性
Windows macOS Linux类别
在 Help Center 和 MATLAB Answers 中查找有关 Smoothing 的更多信息
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!