next up previous contents
Seguinte: Operações com Matrizes Acima: Extração e Deletação Anterior: Extração das Colunas Inteiras   Conteúdo

Extração das Submatrizes da Matriz

Para extrair submatriz da matriz, por exemplo, da matriz $A$ dada acima, veja o comando abaixo:

$>$ S:=submatrix(A,2..3,1..2): S=matrix(S);


\begin{displaymath}
S = \left[ {{\begin{array}{*{20}c}
{ - 4} \hfill & 2 \hfill \\
3 \hfill & 4 \hfill \\
\end{array} }} \right]
\end{displaymath}

A submatriz obtida acima representa a segunda e terceira linhas e a primeira e segunda colunas da matriz $A$.

I.3.6 Deletação

Podemos usar os comandos do "Maple" para deletar alguma linha ou alguma coluna da matriz. Veja os comandos a seguir:

Vamos considerar uma matriz aleatória $A$ de ordem $3\times
4$.

$>$ A:=randmatrix(3,4,entries=rand(-3..5));


\begin{displaymath}
A: = \left[ {{\begin{array}{*{20}c}
3 \hfill & 5 \hfill & 5...
...ll & 0 \hfill & 0 \hfill & 4 \hfill \\
\end{array} }} \right]
\end{displaymath}

$>$ delcols(A,2..3);


\begin{displaymath}
\left[ {{\begin{array}{*{20}c}
3 \hfill & { - 2} \hfill \\ ...
...hfill \\
{ - 3} \hfill & 4 \hfill \\
\end{array} }} \right]
\end{displaymath}

$>$ delcols(A,1..1);


\begin{displaymath}
\left[ {{\begin{array}{*{20}c}
5 \hfill & 5 \hfill & { - 2}...
...\\
0 \hfill & 0 \hfill & 4 \hfill \\
\end{array} }} \right]
\end{displaymath}

$>$ delrows(A,1..2);


\begin{displaymath}
\left[ {{\begin{array}{*{20}c}
{ - 3} \hfill & 0 \hfill & 0 \hfill & 4 \hfill \\
\end{array} }} \right]
\end{displaymath}

$>$ delrows(A,2..2);


\begin{displaymath}
\left[ {{\begin{array}{*{20}c}
3 \hfill & 5 \hfill & 5 \hfi...
...ll & 0 \hfill & 0 \hfill & 4 \hfill \\
\end{array} }} \right]
\end{displaymath}

Observe que o primeiro dois casos refere-se para deletação das colunas onde utilizamos o comando textbfdelcols" e os últimos dois casos se referem a deletação das linhas onde utilizamos o comando textbfdelrows".


next up previous contents
Seguinte: Operações com Matrizes Acima: Extração e Deletação Anterior: Extração das Colunas Inteiras   Conteúdo
taneja 2003-02-26