Solve Magic Square

Find all combinations of entries in a matrix which sum equals a certain number up to eps precision.
ダウンロード: 361
更新 2013/4/4

ライセンスの表示

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 AnswersSmoothing についてさらに検索
謝辞

ヒントを得たファイル: ISEQUALFP: Check equality within floating point precision

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.1.0.0

Added floating point precision, progress should not decrease due to the polynom behind it

1.0.0.0