MATLAB How to Plot Particles and Calculate Spherical Harmonics in MATLAB?

AI Thread Summary
To visualize particle positions in 3D using MATLAB, the user found that the function plot3(x,y,z,'.') effectively plots points as small balls in 3D space, where x, y, and z are arrays of coordinates. Additionally, the user inquired about calculating the spherical harmonics component Y_l_m for a set of points r_i in MATLAB, seeking guidance on expanding these points in a series of spherical harmonics. This process is described as straightforward but requires specific implementation details for accurate results.
JoAuSc
Messages
197
Reaction score
1
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 r_i, how would you find Y_l_m (r_i)?
 
Last edited:
Physics news on Phys.org
You need to expand the points in a series of Y_l_m (r_i). It is a fairly straightforward proceedure to do so.
 

Similar threads

Replies
2
Views
3K
Replies
8
Views
2K
Replies
1
Views
2K
Replies
4
Views
2K
Replies
1
Views
5K
Replies
5
Views
2K
Replies
2
Views
3K
Back
Top