Vector
Paolo de Leva University of Rome – Foro Italico, Rome, IT
Summary Multiple dot, cross, and outer products, cross divisions, Euclidean norms, normalizations, projections, rejections, with automatic virtual array expansion enabled.
Description This toolbox was written to complete the incomplete set of vectorial operations provided with MATLAB, and to enhance the features of two of them (DOT and CROSS), by enabling virtual array expansion (AX). AX is enabled in all the binary operations included in this toolbox, and allows you, for instance, to multiply a single vector with an array of vectors, by virtually replicating the vector to match the size of the array. All the functions in this toolbox can automatically operate on block arrays (arrays of any size containing vectors along one of their dimensions). MATLAB includes four functions which can apply binary operations on the vectors contained in two block arrays: + DOT CROSS Generic operator usable to perform vector additions. Generic operator usable to perform vector subtractions. Specific function performing dot (inner) products. Specific function performing cross products.
They all perform multiple operations, but they cannot perform automatic AX. MATLAB also includes function SUM, which can be used to add together two or more vectors contained in a single matrix or N-D array. For instance, if A is a M×N matrix, regarded as a concatenation of N column vectors, these vectors can be added together by using SUM(A, 2), which yields an M×1 matrix. DOT2 and CROSS2, included in this toolbox, enable AX for dot and cross products. Outer products, orthogonal cross divisions, and generalized cross divisions with AX enabled, can be performed by calling functions OUTER, OCD, and CROSSDIV, included in this toolbox.
Figure 1. The infinitely many anticrossproducts of the cross product a ×