Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- V0 = [7.7137, -2.4986 ];
- XY = [0,1.6];
- G = 9.8066;
- Q = 4.648; %верно для нормального ускорения
- P1 = -0.2466;
- P2 = -1.67;
- C3 = 0;
- F = @(T,V) [...
- -Q * V(1) - (P1 * (V(1).^2 + V(2).^2)...
- + P2 * sqrt(V(1).^2 + V(2).^2)) * V(1)/sqrt(V(1).^2 + V(2).^2);...
- Q * V(2) - (P1 * (V(1).^2 + V(2).^2)...
- + P2 * sqrt(V(1).^2 + V(2).^2)) * V(2)/sqrt(V(1).^2 + V(2).^2) - G];
- [T, V] = ode45(F, [0 1.5], V0);
- for I = 2: numel(V(:,1))
- DT = (T(I) - T(I - 1));
- XY(I,1) = XY(I-1, 1) + V(I - 1, 1)* DT;
- XY(I,2) = XY(I-1, 2) + V(I - 1, 2)* DT;
- end
- plot(XY(:,1), XY(:,2),'green');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement