Problem Solving Kinematic ODE with Forcing Function
1 次查看(过去 30 天)
显示 更早的评论
I am trying to set up what I believe is an ODE to solve for the position, velocity, and acceleration of a buoy given the waves incidence. This is dependent upon the forcing funcition of the buoyance force from the wave on the buoy. I have an array for the buoyant force fb, and I am trying to evaluate my kinematic equation: mz" = ks * a(t) - z' * damp - fb * z. The problem is solving ODE45 as the forcing function changes every iteration so my time step is not constant.
for i = 1:(length(IntSteps)-1)
B = fb(i);
dat = 1.2 * sin(IntSteps(i));
tstart = TimeStep * i;
tend = TimeStep * i + .1;
[t, y] = ode45(@odeBuoy,[tstart tend],[0;0]);
end
My ode function may also be set up incorrectly which is as follows.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!