Path: news.mathworks.com!not-for-mail
From: "Natalie Sin Hwee " <sin.ng09@imperial.ac.uk>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Find angle between two lines
Date: Thu, 8 Jul 2010 21:37:04 +0000 (UTC)
Organization: Imperial College
Lines: 15
Message-ID: <i15ge0\$91n\$1@fred.mathworks.com>
References: <hno4am\$6ui\$1@fred.mathworks.com> <hno669\$aj9\$1@fred.mathworks.com> <hnocom\$c9h\$1@fred.mathworks.com> <hnqh84\$p5k\$1@fred.mathworks.com> <hnrncl\$mit\$1@fred.mathworks.com> <i14qq5\$2rp\$1@fred.mathworks.com> <i157f5\$mkt\$1@fred.mathworks.com>
Reply-To: "Natalie Sin Hwee " <sin.ng09@imperial.ac.uk>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1278625024 9271 172.30.248.38 (8 Jul 2010 21:37:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 8 Jul 2010 21:37:04 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:651607

Sorry i forgot to ask,

If i was to apply this into 3D,

how can i apply  ang = mod( atan2( det([v1;v2]) , dot(v1,v2) ) , 2*pi );
if e.g.
v1= [1,2,3]
v2= [4,5,6]
I tried but it says:

??? Error using ==> det
Matrix must be square.

Thanks
Natalie