I would like to determinate the time it takes to return the starting point the Lotka Volterra system. I have the function to make it, but is not functional for my objetive, someone have a diferente form?
I show mi function, the problem is that the method has a angles, and for my objective is not functional.
Thank you very much for your help!
function [g,isterm,dir] = pits(t,y)
sig = sign(eta(1)-mu(1)+realmin);
theta1 = atan2(sig*(y(2)-mu(2)),sig*(y(1)-mu(1)));
theta0 = atan2(sig*(eta(2)-mu(2)),sig*(eta(1)-mu(1)));
g = theta1 - theta0;
isterm = t > 1;
dir = 1;