axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] [Computing with Vectors] (new)


From: kratt6
Subject: [Axiom-developer] [Computing with Vectors] (new)
Date: Tue, 08 Nov 2005 07:28:39 -0600

Changes 
http://page.axiom-developer.org/zope/mathaction/ComputingWithVectors/diff
--
How to multiply two vectors??

  Multiplication element by element:

*Vanuxem Grégory replies:*

\begin{axiom}
a:= vector [1,2,3,5,6]
map(*,a,a)
\end{axiom}

otherwise use Matrix:
\begin{axiom}
a:= matrix [[1,2,3,4,5,6]]
a * transpose a
\end{axiom}

Tim Daly replies:

make three vectors
\begin{axiom}
)clear all
u : VECTOR INT := new(5,12)
v : VECTOR INT := vector([1,2,3])
w : VECTOR INT := vector([2,3,4])
\end{axiom}
multiply them
\begin{axiom}
cross(v,w)
\end{axiom}
dot product
\begin{axiom}
dot(v,w)
\end{axiom}
ask for the length
\begin{axiom}
#(v)
\end{axiom}
access an element
\begin{axiom}
v.2
\end{axiom}
set an element
\begin{axiom}
v.3 := 99
\end{axiom}
show the vector
\begin{axiom}
v
\end{axiom}
multiply by a constant
on either side
\begin{axiom}
5 * v
v * 7
\end{axiom}

add them
\begin{axiom}
v + w
\end{axiom}

substract them
\begin{axiom}
v - w
\end{axiom}

display all possible functions
\begin{axiom}
)show Vector(Integer)
\end{axiom}
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]