Besides the standard linear algebra operations, there are also the following functions available in MTEX.
angle between two specimen directions
length of the specimen directions
normalize length to 1
sum over all specimen directions in v
mean over all specimen directions in v
conversion to spherical coordinates
A simple example for applying the norm function is to normalize a set of specimen directions
Lists of vectors
As any other MTEX variable you can combine several vectors to a list of vectors. Additionally, all the operators operations mentioned before will work elementwise on a list of vectors. See Working with lists on how to manipulate lists in Matlab.
Using the brackets
v = [v1,v2] two lists of vectors can be joined to a single list. Now each single vector is accesable via
When calculating with concatenated specimen directions all operations are performed componentwise for each specimen direction.
A list of vectors can be indexed directly by specifying the ids of the vectors one is interested in, e.g.
gives the first 5 vectors from the list, or by logical indexing. The following command plots all vectors with an polar angle smaller then 60 degree