From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Angle between line and axis
Date: Tue, 10 Jan 2012 17:30:09 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 19
Message-ID: <jehsj1$3v1$>
References: <jehf9c$esc$> <> <>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1326216609 4065 (10 Jan 2012 17:30:09 GMT)
NNTP-Posting-Date: Tue, 10 Jan 2012 17:30:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: comp.soft-sys.matlab:754329

Rune Allnor <> wrote in message <>...

> Two comments:
> 1) The inner product is the general method, while
>    your suggestion only works with respct to one of
>    the axes.

Wong again, the atan2() method can extend to angle between two arbitrary vectors (in R2 and R3, which is the case). I leave for you to find the formula as exercise Rune.

> 2) Somebody who needs to ask the question at all
>    is not concerned with numerical accuracies.

This is a bonus (beside it is a *correct* method, contrary to what  you did claim)