MATLAB POLYSPACE RELEASE NOTES Manual de usuario Pagina 46

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 240
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 45
2 Matrices and Arra ys
Arrays
When they are taken away from the world of linear algebra, matrices become
two-dimensional numeric arrays. Arithmetic operations on arrays are
done element by element. This means that addition and subtraction are
the same for arrays and matrices, but that multiplicative operations are
different. MATLAB use s a dot, or decimal point, as part of the notatio n for
multiplicative array operations.
The list of operators includes
+
Addition
-
Subtraction
.*
Element-by -element multiplication
./
Element-by-element division
.\
Element-by-element left division
.^
Element-by-element power
.'
Unconjugated array transpose
If the Dürer magic s q uare is multip li ed by itsel f with array multi plication
A.*A
the result is an array containing the squares of the integers from 1 to 16,
in an unusual order:
ans =
256 9 4 169
25 100 121 64
81 36 49 144
16 225 196 1
Building Tables
Array operations are useful for building tables. Suppose n is the column vector
n = (0:9)';
2-24
Vista de pagina 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 239 240

Comentarios a estos manuales

Sin comentarios