2010年7月28日 星期三

Matlab , inner , outer, tensor Product

from here :http://www.mathworks.com/access/helpdesk/help/techdoc/math/f4-988203.html

outer:
u = [3; 1; 4]; v = [2 0 -1];
x = v*u
x = 2
X = u*v
X = 6 0 -3
2 0 -1
8 0 -4

inner :
we often use the transform operator x' . i think it is easy for u to understand , so dont do explain.


tensor :

The Kronecker product is often used with matrices of zeros and ones to build up repeated copies of small matrices. For example, if X is the 2-by-2 matrix

X =       
1 2
3 4

and I = eye(2,2) is the 2-by-2 identity matrix, then the two matrices

kron(X,I)

and

kron(I,X)

are

       1     0     2     0       
0 1 0 2
3 0 4 0
0 3 0 4

and

1     2     0     0       
3 4 0 0
0 0 1 2
0 0 3 4

沒有留言:

張貼留言