Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Plot_Trajectory(Rm, h_isl, x_list, y_list, x_special, y_special)
- figure('Name', "Траектория");
- hold on;
- % Луна
- theta = linspace(deg2rad(75), deg2rad(105), 10^3);
- x_moon = Rm * cos(theta);
- y_moon = Rm * (sin(theta) - 1);
- plot(x_moon, y_moon, 'k');
- % Орбита
- x_orb = Rm * cos(theta);
- y_orb = Rm * (sin(theta) - 1) + h_isl;
- plot(x_orb, y_orb, 'k--');
- % Траектория
- plot(x_list, y_list, 'b');
- % Критические точки
- scatter(x_special, y_special, 'rs');
- % Настройка осей и сетки
- grid on;
- grid minor;
- xline(0, 'k--');
- yline(0, 'k--');
- axis equal;
- xlabel('x, [m]');
- ylabel('y, [m]');
- title('Траектория СВ');
- legend('Луна', 'Орбита', 'Траектория СВ', 'Особые точки', 'Location', 'Northwest');
- hold off;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement