From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Angle between two vectors
Date: Tue, 16 Aug 2011 11:17:31 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 9
Message-ID: <j2djkb$j0o$>
References: <ef5ce9c.-1@webcrossing.raydaftYaTP> <> <> <> <> <idlqpm$rc7$> <il9t55$en6$> <ila06k$t8g$> <ilambc$67b$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1313493451 19480 (16 Aug 2011 11:17:31 GMT)
NNTP-Posting-Date: Tue, 16 Aug 2011 11:17:31 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2892724
Xref: comp.soft-sys.matlab:740138

Wondering if anyone can please help me with yet another problem calculating angles in matlab!

Ill set the scene:
I am simulating erosion on volcano slopes. I have a bathymetry dataset for a volcano - a matrix of land heights in the form a grid. Suppose for simplicity the grid is 100km x 100km and i have a measurement of land height (z) at every 1km. So we are in 3D.

I want to calculate the angle of the volcano sides - so essentially I will have a matrix of angles in which the slope angle is calculated between a point and the point directly above it (so looking from the bottom of the volcano towards the peak). Im struggling because on the East slope, the peak will be to the West, whereas at the South, it will be to the North. I thus wonder whether I will need to calculate the angles using vertical cross sections of the volcano and rotate the matrix through 360 degrees. 

Some help would be greatly appreciated as honestly i dont know where to start! and let me know if what ive said doesnt make sense!
Thank you!!