MATLAB BUILDER JA 2 Guía de usuario Pagina 30

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 292
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de 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
Vista de pagina 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 291 292

Comentarios a estos manuales

Sin comentarios