필터 지우기
필터 지우기

Solving an ode without ode45

조회 수: 2 (최근 30일)
Kebels3
Kebels3 2020년 3월 24일
댓글: darova 2020년 3월 24일
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')

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by