

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!


VECTORS AND MATRICES quicksheets The submatrix function
submatrix(A, ir, jr, ic, jc): Returns the matrix consisting of rows ir through jr and columns ic through jc of array A.
Arguments:
Extracting a Submatrix This QuickSheet illustrates the use of the submatrix^ function.
Input matrix: M
Extract all elements common to both rows 1 and 2 and columns 0, 1, and 2:
submatrix M 1( , , 2 , 0 , 2 ) −^5 − 6
Swapping the last two arguments reverses the order of the columns:
submatrix M 1( , , 2 , 2 , 0 ) −^2 − 3
Swapping the first two scalar arguments reverses the order of the rows:
submatrix M 2( , , 1 , 2 , 0 ) −^3 − 2
You can also use the picture operator to extract pieces of an array visually.