How to Plot Particles and Calculate Spherical Harmonics in MATLAB?

Click For Summary
SUMMARY

The discussion focuses on visualizing particle positions in 3D space using MATLAB. The user initially sought a function for plotting particles but discovered that the simple command plot3(x,y,z,'.') effectively achieves this. Additionally, the user inquired about calculating spherical harmonics components for a set of points, specifically how to expand points in a series of Y_l_m(r_i).

PREREQUISITES
  • Familiarity with MATLAB programming environment
  • Understanding of 3D plotting functions in MATLAB
  • Knowledge of spherical harmonics and their mathematical representation
  • Basic concepts of particle physics and spatial coordinates
NEXT STEPS
  • Research MATLAB's plot3 function for advanced 3D visualizations
  • Learn about calculating spherical harmonics using MATLAB's built-in functions
  • Explore the sphere function in MATLAB for creating spherical plots
  • Investigate numerical methods for expanding functions in terms of spherical harmonics
USEFUL FOR

Researchers, physicists, and engineers working with 3D data visualization and spherical harmonics calculations in MATLAB.

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 [tex]r_i[/tex], how would you find [tex]Y_l_m (r_i)[/tex]?
 
Last edited:
Physics news on Phys.org
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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K