http://www.mathworks.com/matlabcentral/newsreader/view_thread/276184
MATLAB Central Newsreader  3D vectors into a 3 by 12000 matrix
Feed for thread: 3D vectors into a 3 by 12000 matrix
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Thu, 11 Mar 2010 13:26:06 +0000
3D vectors into a 3 by 12000 matrix
http://www.mathworks.com/matlabcentral/newsreader/view_thread/276184#725487
Anna Lappala
Hello again,<br>
<br>
My problem is as follows:<br>
atom positions in 3D space are given by 3 vectors x, y,z.<br>
I can use plot3 to get a plot of my points in 3D. <br>
Now, I need a matrix which is composed of x, y and z in a form that can be used for later anaylisis of the matrix and not simply vectors. My matrix 'c' should look like this:<br>
x1 y1 z1<br>
x2 y2 z2<br>
x3 y3 z3<br>
: : :<br>
<br>
so that I can use commands such as sum(c) for instance.

Thu, 11 Mar 2010 13:33:04 +0000
Re: 3D vectors into a 3 by 12000 matrix
http://www.mathworks.com/matlabcentral/newsreader/view_thread/276184#725489
Sadik
How about the following? <br>
<br>
c = [x y z];<br>
<br>
Best.<br>
<br>
<br>
<br>
<br>
"Anna Lappala" <s0793217@sms.ed.ac.uk> wrote in message <hnar1e$osj$1@fred.mathworks.com>...<br>
> Hello again,<br>
> <br>
> My problem is as follows:<br>
> atom positions in 3D space are given by 3 vectors x, y,z.<br>
> I can use plot3 to get a plot of my points in 3D. <br>
> Now, I need a matrix which is composed of x, y and z in a form that can be used for later anaylisis of the matrix and not simply vectors. My matrix 'c' should look like this:<br>
> x1 y1 z1<br>
> x2 y2 z2<br>
> x3 y3 z3<br>
> : : :<br>
> <br>
> so that I can use commands such as sum(c) for instance.

Thu, 11 Mar 2010 13:45:12 +0000
Re: 3D vectors into a 3 by 12000 matrix
http://www.mathworks.com/matlabcentral/newsreader/view_thread/276184#725494
Anna LN
Thank you Sadik!<br>
<br>
I guessed that it shouldn't be too difficult! It works now, I have tried it before but now it works. <br>
<br>
Thank you!<br>
<br>
"Sadik " <sadik.hava@gmail.com> wrote in message <hnareg$lcp$1@fred.mathworks.com>...<br>
> How about the following? <br>
> <br>
> c = [x y z];<br>
> <br>
> Best.<br>
> <br>
> <br>
> <br>
> <br>
> "Anna Lappala" <s0793217@sms.ed.ac.uk> wrote in message <hnar1e$osj$1@fred.mathworks.com>...<br>
> > Hello again,<br>
> > <br>
> > My problem is as follows:<br>
> > atom positions in 3D space are given by 3 vectors x, y,z.<br>
> > I can use plot3 to get a plot of my points in 3D. <br>
> > Now, I need a matrix which is composed of x, y and z in a form that can be used for later anaylisis of the matrix and not simply vectors. My matrix 'c' should look like this:<br>
> > x1 y1 z1<br>
> > x2 y2 z2<br>
> > x3 y3 z3<br>
> > : : :<br>
> > <br>
> > so that I can use commands such as sum(c) for instance.