From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Matlab 3-d Walk problem
Date: Fri, 19 Nov 2010 01:16:03 +0000 (UTC)
Organization: University of Arizona
Lines: 9
Message-ID: <ic4j4j$oqf$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1290129363 25423 (19 Nov 2010 01:16:03 GMT)
NNTP-Posting-Date: Fri, 19 Nov 2010 01:16:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2599472
Xref: comp.soft-sys.matlab:688206

     Hi everyone.  So, I'm currently taking a physics course which happens to involve a computer project; the project is a statistical analysis of a 3-dimensional random walk (each step being the same length and random in x,y,and z orientations).  I'm fairly new to Matlab (I originally learned programming a couple years ago in C, but most of that has since been forgotten). 

     Anyways, here is a description of what I have so far...

     -To begin the code, I started by creating a unit vector (I used spherical coordinates for the unit because I was able to set r=1, and I then decomposed the vector for its x, y and z components).  

The problem...I am able to create my randomly oriented unit vectors, and I am assuming since it is inside of a "for" loop to account for all N steps.  Right now, my code returns a list of the vectors that compose each step, I just need to figure out how to add them.  Once I get this part, the statistical analysis comes into play, which should then be no problem.  

Does anybody have an idea of how to do this, or a way around it?