scale x,y and z axis to match JPL Database
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I am using the NASA JPL Databases and learning how to plot the Three-Body Periodic Orbits using ode45 and my own derivate function. I was wondering if anyone knows how to scale the x,y and z axis to fit in with the JPL Databases. https://ssd.jpl.nasa.gov/tools/periodic_orbits.html
0 comentarios
Respuestas (1)
Arnav
el 4 de Sept. de 2024
Based on my understanding, you wish to scale the ranges of all three axes to be same and set limits of the plots such that the whole figure is visible.
The maximum range of the data can be calculated by using the max function as:
max_range = max([max(abs(X)), max(abs(Y)), max(abs(Z))]);
Then, after plotting the data you can set the limits for the axes by using the axis function as:
axis([-max_range, max_range, -max_range, max_range, -max_range, max_range]);
axis equal;
You may refer to the documentation page of axis for more information : https://www.mathworks.com/help/matlab/ref/axis.html#responsive_offcanvas
0 comentarios
Ver también
Categorías
Más información sobre Axis Labels en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!