Borrar filtros
Borrar filtros

Solving an ode without ode45

2 visualizaciones (últimos 30 días)
Kebels3
Kebels3 el 24 de Mzo. de 2020
Comentada: darova el 24 de Mzo. de 2020
Hi guys,
I want to solve an ODE but i dont want to use ode45. I want to numerically intergrate v and s.
Im stuck at this point.
Can any one of you guys help me out pls?
Greets
Jeroen
F = @(t, x) [x(2); -0.1/50*x(2) - 2*x(1)];
T = 0:0.001:10;
S = [0.5 0];
for a = 1:T
v ( Position + 0.001) = v (Position) + a (Position) * 0.001;
s ( Position + 0.001 = s (Position) + v (Position * 0.001:
end
%%[t, y] = ode45(F, T, S);
plot(t,y)
legend({'Position', 'Speed'});
ylabel('Position / Speed [m / m/s]')
xlabel('Time [s]')
title('Mass-spring-damper system')

Respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by