scale x,y and z axis to match JPL Database
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Arnav
2024년 9월 4일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Axis Labels에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!