Plotting particles in MATLAB

  • MATLAB
  • Thread starter JoAuSc
  • Start date
  • #1
198
0
I have data for the positions of particles in 3D space and I'm trying to use MATLAB in order to visualize it. How do I plot little balls in 3D? The only function I can find at the minute is streamParticles but I'm looking for something simpler.

EDIT: Nevermind, I figured it out. You simply do plot3(x,y,z,'.'), where x, y, and z are arrays of coordinates.


I do have another question, though. How do you find the spherical harmonics component of a point in MATLAB? In other words, if you have a set of points [tex]r_i[/tex], how would you find [tex]Y_l_m (r_i)[/tex]?
 
Last edited:

Answers and Replies

  • #2
Dr Transport
Science Advisor
Gold Member
2,501
626
You need to expand the points in a series of [tex]Y_l_m (r_i)[/tex]. It is a fairly straightforward proceedure to do so.
 

Related Threads on Plotting particles in MATLAB

  • Last Post
Replies
2
Views
4K
  • Last Post
Replies
8
Views
5K
  • Last Post
Replies
1
Views
9K
  • Last Post
Replies
7
Views
3K
Replies
1
Views
915
  • Last Post
Replies
4
Views
906
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
2
Views
6K
Top