MATLAB BUILDER JA 2 Guida Utente Pagina 30

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 292
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 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
Vedere la pagina 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 291 292

Commenti su questo manuale

Nessun commento