MATLAB BUILDER JA 2 Guide de l'utilisateur Page 30

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 292
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 29
1 Getting Started
When you run the program you pass an argument representing the dimension
for the magic square. In this example, the v alue for the dimension is
5.
The program converts the number passed on the command line to a scalar
double value, creates an instance of class magic, and calls the makesqr
method on that object. The method computes the square using the MATLAB
magic function.
The
getmagic program should display the following output:
Magic square of order 5
17 24 1 8 15
23571416
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
1-22
Vue de la page 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 291 292

Commentaires sur ces manuels

Pas de commentaire