Hi. I'm working on a project using one of the ode solvers in matlab to generate a numerical solution to an ode for charged particle motion. I've used the ODE solver before but I'm just confused on how to set up my function for my equation. The equation I'm using to solve for general motion for the charged particle is:
m*(dv/dt) = q(v x B)
I know that the general analytic solution to this problem is r = mV/qB but I am unsure of how to work this out with the ODE solution. If anyone could give me some help setting up my function it would be greatly appreciated. Thank you.