Docsity

Mathcad sub matrix ejemplo, Diapositivas de Mecánica Aplicada

Toggle sidebar
bg1
VECTORS AND M ATRICES
quicksheets
The submatrix function
submatrix(A, ir, jr, ic, jc): Returns the matrix consisting of rows ir th rough jr
and columns ic through jc of array A.
Arguments:
• A, B, C , ... are arrays having the same number of rows for augment, or the same
number of columns for stack.
• ir, jr are the integer upper and lower indices of the rows to be extracted.
• ic, jc are the integer upper and lower indices of the columns to be extracted.
Extracting a Submatrix
This QuickSheet illustrates the use of the submatrix function.
Input matrix: M
1
5−
6−
1
4
7
8−
9−
2
5
1
2−
3−
3
5
4
3
2
4
6
4
3
3
3
8
:=
Extract all elements common to both rows 1 and 2 and columns 0,
1, and 2:
submatrix M 1, 2, 0, 2, ( ) 5−
6−
8−
9−
2−
3−
=
Swapping the last two arguments reverses the order of the columns:
submatrix M 1, 2, 2, 0, ( ) 2−
3−
8−
9−
5−
6−
=
pf3

Vista previa parcial del texto

¡Descarga Mathcad sub matrix ejemplo y más Diapositivas en PDF de Mecánica Aplicada solo en Docsity!

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:

  • A, B, C , ... are arrays having the same number of rows for augment, or the same number of columns for stack.
  • ir, jr are the integer upper and lower indices of the rows to be extracted.
  • ic, jc are the integer upper and lower indices of the columns to be extracted.

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.