Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
3D vectors into a 3 by 12000 matrix

Subject: 3D vectors into a 3 by 12000 matrix

From: Anna Lappala

Date: 11 Mar, 2010 13:26:06

Message: 1 of 3

Hello again,

My problem is as follows:
atom positions in 3D space are given by 3 vectors x, y,z.
I can use plot3 to get a plot of my points in 3D.
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:
x1 y1 z1
x2 y2 z2
x3 y3 z3
: : :

so that I can use commands such as sum(c) for instance.

Subject: 3D vectors into a 3 by 12000 matrix

From: Sadik

Date: 11 Mar, 2010 13:33:04

Message: 2 of 3

How about the following?

c = [x y z];

Best.




"Anna Lappala" <s0793217@sms.ed.ac.uk> wrote in message <hnar1e$osj$1@fred.mathworks.com>...
> Hello again,
>
> My problem is as follows:
> atom positions in 3D space are given by 3 vectors x, y,z.
> I can use plot3 to get a plot of my points in 3D.
> 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:
> x1 y1 z1
> x2 y2 z2
> x3 y3 z3
> : : :
>
> so that I can use commands such as sum(c) for instance.

Subject: 3D vectors into a 3 by 12000 matrix

From: Anna L-N

Date: 11 Mar, 2010 13:45:12

Message: 3 of 3

Thank you Sadik!

I guessed that it shouldn't be too difficult! It works now, I have tried it before but now it works.

Thank you!

"Sadik " <sadik.hava@gmail.com> wrote in message <hnareg$lcp$1@fred.mathworks.com>...
> How about the following?
>
> c = [x y z];
>
> Best.
>
>
>
>
> "Anna Lappala" <s0793217@sms.ed.ac.uk> wrote in message <hnar1e$osj$1@fred.mathworks.com>...
> > Hello again,
> >
> > My problem is as follows:
> > atom positions in 3D space are given by 3 vectors x, y,z.
> > I can use plot3 to get a plot of my points in 3D.
> > 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:
> > x1 y1 z1
> > x2 y2 z2
> > x3 y3 z3
> > : : :
> >
> > so that I can use commands such as sum(c) for instance.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us