[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
multiplying matrices into tensors?
From: |
James Cloos |
Subject: |
multiplying matrices into tensors? |
Date: |
Wed, 03 Aug 2011 18:23:36 -0400 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) |
I have a pair of matrices, such as:
a = [ 0 20 10 -10 -20 0 ;
-25 -5 15 15 -5 -25 ;
0 0 0 0 0 0 ;
5 1 1 1 1 5 ]
b = [ 0 100 100 0 0 100 100 0 0 100 ;
0 0 100 100 0 0 100 100 0 0 ;
0 0 0 0 0 0 0 0 0 0 ;
1 1 1 1 1 1 1 1 1 1 ]
representing lists of points where each column is an xyzw point in R³P.
(In this case they are actually lists of points in R²P, but the
underlying storage always stores in R³P and wants them ordered
as above.)
I need to mupliply the points together piecewise to generate a 3-d tensor
representing a 2-d array of xywz points, using the typical:
$[ c_{i,j} = a_i × b_j $]
formulation.
Does octave have an easy way of accomplishing that? Especially given
the homogeneous coordinates?
Or will I need to write a funtion to loop through the two and multiply
as needed?
I'm more comfortable doing this stuff in C or Perl, but I wanted to see
whether octave would make prototyping quicker. I've looked through the
docs and some of the code (including octave-forge code), but haven't yet
found the right clue....
Thanks,
-JimC
--
James Cloos <address@hidden> OpenPGP: 1024D/ED7DAEA6