Solving differential equation ODE45

1 view (last 30 days)
BipityBop
BipityBop on 28 Apr 2020
Commented: BipityBop on 28 Apr 2020
Hi,
I have two matrices, with just numeric values of velocities in x and y direction as its entries, stored separately. To find all positions I'll have to integrate the velocity values w.r.t time (dx = u*dt). How do I solve this using ode45 only? Because I have a matrix and not a function to give into the argument for ode45
Thanks!
  2 Comments
BipityBop
BipityBop on 28 Apr 2020
Basically I'm trying to simulate poisuelle flows with obstacles in the flow channel and plotting it using streamline function. I have stored the x-direction and y-direction velocity at every point in the flow channel. Now, I'm considering a particle in the flow and trying to study the positions it would take during its course of journey in the flow channel. To get x and y positions (co-ordinates) of this particle I will have to integrate the x-direction and y-direction velocity with respect to time, which put mathematically is x' = u and y' = v (x is the x coordinate of the position of the particle, y is the y coordinate of the position of the particle; u and v are x direction and y direction velocities respectively). This is a simple ODE to solve, but I would like to solve it using ODE45 function. Not sure of how to pass a matrix as an argument and u and v are time independent parameters.

Sign in to comment.

Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!

Translated by