Ahora está siguiendo esta publicación
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
1. You may run the scripts to see the examples.
2. You may also use your own case.
3. Your own case should be a struct array whose elements represent bodies’ initial states. Each element (body) contains 4 fields: mass (a positive scalar), position (a 1-by-3 vector, relative to the origin point), velocity (a 1-by-3 vector), and acceleration (a 1-by-3 vector).
You may check the examples in these scripts and in the folder TestCase.
Visualization-related settings are in the class Viewer. You may modify the code to see what happens :)
(a) marker size, (b) axis limit, (c)choice of whether fixed axis is applied, (d) choice of whether minor grid is displayed, (e) choice of whether stars’ trails are displayed, and (f) choice of whether star 1 is highlighted.
4. Note that this program cannot handle collisions - they just "pass through" each other (not true in reality). The script Script2starCollision shows what would happen in this situation.
5. Just a prototype, may has some bugs. Ctrl+C to terminate the program.
Citar como
Haihong (2026). GalaxyModel (https://la.mathworks.com/matlabcentral/fileexchange/54355-galaxymodel), MATLAB Central File Exchange. Recuperado .
Agradecimientos
Inspirado por: octree - partitioning 3D points into spatial subvolumes, Gravity Simulator
Categorías
Más información sobre Gravitation, Cosmology & Astrophysics en Help Center y MATLAB Answers.
Información general
- Versión 1.2.0.0 (1,06 MB)
Compatibilidad con la versión de MATLAB
- Compatible con cualquier versión
Compatibilidad con las plataformas
- Windows
- macOS
- Linux
