MATLAB BUILDER JA 2 Betriebsanweisung Seite 30

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 292
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 291 292

Kommentare zu diesen Handbüchern

Keine Kommentare