Skip to content

Commit

Permalink
Clarify symmetric, outerProduct, skew etc. (#2485)
Browse files Browse the repository at this point in the history
* Clarify symmetric, outerProduct, skew etc.
Closes #2295
  • Loading branch information
HansOlsson committed Mar 20, 2020
1 parent 2f0c7ee commit dc7ad4e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions chapters/arrays.tex
Expand Up @@ -505,9 +505,10 @@ \subsubsection{Reduction Expressions}\doublelabel{reduction-expressions}
\subsection{Matrix and Vector Algebra Functions}\doublelabel{matrix-and-vector-algebra-functions}

The following set of built-in matrix and vector algebra functions are
available. The function transpose can be applied to any matrix. The
functions outerProduct, symmetric, cross and skew require Real/Integer
vector(s) or matrix as input(s) and returns a Real vector or matrix:
available. The function transpose and symmetric can be applied to any matrix. The
functions outerProduct, cross and skew require Real/Integer
vector(s) or matrix as input(s) and returns a Real/Integer vector or matrix (the result is only Integer
if the input/all inputs are Integer):

\begin{longtable}[]{|p{3.5cm}|p{11.5cm}|}
\caption{Matrix and vector algebra functions.}\\
Expand All @@ -521,10 +522,8 @@ \subsection{Matrix and Vector Algebra Functions}\doublelabel{matrix-and-vector-a
& Returns the outer product of vectors v1 and v2 ( = matrix(v1)*transpose(
matrix(v2) ) ).\\ \hline
\lstinline!symmetric(A)!
& Returns a matrix where the diagonal elements and the elements above the
diagonal are identical to the corresponding elements of matrix A and
where the elements below the diagonal are set equal to the elements
above the diagonal of A, i.e., \lstinline!B := symmetric(A) ->!
& Returns a symmetric matrix which is identical to the square matrix \lstinline!A!
on and above the diagonal, i.e., \lstinline!B := symmetric(A) ->!
\lstinline!B[i,j] := A[i,j], if i <= j, ! \lstinline! B[i,j] := A[j,i], if i > j!.\\ \hline
\lstinline!cross(x,y)!
& Returns the cross product of the 3-vectors x and y, i.e.
Expand Down

0 comments on commit dc7ad4e

Please sign in to comment.