# magic

Magic square

## 📝 Syntaxe

* M = magic(N)

## 📥 Argument d'entrée

* N - Matrix order, specified as a scalar integer.

## 📤 Argument de sortie

* M - result of magic function.

## 📄 Description

M = magic(N) computes an square matrix constructed as an arrangement of the 1:n^2 such that the row sums, column sums, and diagonal sums are all equal to the same value.

## 💡 Exemple

```matlab
M = magic(3)
```

## 🔗 Voir aussi

[ones](https://nelson-9.gitbook.io/nelson/markdown/fr/constructors_functions/ones).

## 🕔 Historique

| Version | 📄 Description   |
| ------- | ---------------- |
| 1.0.0   | version initiale |
