Home > functions > common > utility > vb_cross2.m

vb_cross2

PURPOSE ^

Fast calculation of cross product

SYNOPSIS ^

function c = vb_cross2(a,b)

DESCRIPTION ^

 Fast calculation of cross product
 c = vb_cross2(a,b)
 c = a x b
 a, b , c : N x 3 

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function    c = vb_cross2(a,b)
0002 % Fast calculation of cross product
0003 % c = vb_cross2(a,b)
0004 % c = a x b
0005 % a, b , c : N x 3
0006 %
0007 % Copyright (C) 2011, ATR All Rights Reserved.
0008 % License : New BSD License(see VBMEG_LICENSE.txt)
0009 
0010 c = [a(:,2).*b(:,3)-a(:,3).*b(:,2), ...
0011      a(:,3).*b(:,1)-a(:,1).*b(:,3), ...
0012      a(:,1).*b(:,2)-a(:,2).*b(:,1)];

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005