How do i transform this equation system in to three dimensions?

1 visualización (últimos 30 días)
Joel Andersson
Joel Andersson el 8 de Dic. de 2021
Respondida: Bjorn Gustavsson el 9 de Dic. de 2021
  1 comentario
Sam Chak
Sam Chak el 9 de Dic. de 2021
Looks like a motion of a rigid body with mass m that is constrained to the 2-dimensional x-y plane.

Iniciar sesión para comentar.

Respuestas (1)

Bjorn Gustavsson
Bjorn Gustavsson el 9 de Dic. de 2021
Since this looks like the equations of motion for a solid body falling in a constant gravitational field with some velocity-dependent drag you only have to realize that the motion will be in a vertical plane, Therefore you can always select a coordinate-system such that one of the two horizontal components (both position and velocity) are identical to zero. Conversely, since the horizontal propagation-direction remains constant you can simply convert the x and vx into two components in an arbitrarily rotated coordinate system. Just integrate the 2-D equations of motion (I'd shift the initial x-coordinate to zero). Then it should be as simple as:
phi0 = pi/sqrt(3);
r0v0_original = [0,1,3,4*cos(phi0),4*sin(phi0),5];
r0v0_for2D = [0,r0v0_original(3),sqrt(r0v0_original(4)^2+r0v0_original(5)),r0v0_original(6)];
[t,rv] = ode45(... % etc
x1 = r0v0_original(1) + rv(:,1)*cos(phi0);
x2 = r0v0_original(2) + rv(:,2)*sin(phi0);
vx1 = rv(:,4)*cos(phi0);
vx2 = rv(:,5)*sin(phi0);
Here I've assumed that you have the position-components as the first 3 (2 in the eqs-of-motion function) and the velocity-components as the last 3 (last 2 in the equation-of-motion).
HTH

Categorías

Más información sobre Assembly 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!

Translated by