Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!1g2000prd.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to create vectors from position data?
Date: Wed, 5 Nov 2008 04:17:41 -0800 (PST)
Organization: http://groups.google.com
Lines: 15
Message-ID: <1b632ef5-2870-4273-81e8-a1ef6335b62c@1g2000prd.googlegroups.com>
References: <gerkmn$sdr$1@fred.mathworks.com>
NNTP-Posting-Host: 77.17.89.217
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1225887461 17323 127.0.0.1 (5 Nov 2008 12:17:41 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 5 Nov 2008 12:17:41 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 1g2000prd.googlegroups.com; posting-host=77.17.89.217; 
	posting-account=VAp5gAkAAAAmkCze5hvZtMeedpZWNthI
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
	CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:499050


On 5 Nov, 09:15, "Dai" <relax2...@hotmail.com> wrote:
> Hi everyone
>
> I have exported three dimensional coordinate data of markers placed along either side of a human spine into a text file. Each marker has three coordinates (x,y,z). I attempted to import the text file into MatLab to create vectors connecting each pair of markers and compute the angle of one vector relative to another but could not work out what functions to use. It would be greatly appreciated if anyone could advise me how to create vectors from coordinate data and compute angles thereafter.

How to create the vector data depends on how you imported
the (x,y,z) data. If you loaded plain text files, the vectors
are already there, as rows or columns in the matrix you loaded.
If the data were loaded as objects or cell arrays, you need to
consult the dcumentation of the format you use.

As for the angles between vectors, you might want to use the
dot and cross products, see the functions DOT and CROSS.

Rune