Hello, people, I am desperate. I have a system of ODE.
In simple case it is just an oscillator, in harder case it is oscillator with attenuation.
The hardest case is the force that must bring opposite effect to attenuation.
So, my system is in file parallelDegreesW4
function xDot = parallelDegreesW4(t,x,~,w_af,g_af,gcurr)
xDot = [x(2); ... %//= theta'
sin(x(1)) * cos(x(1)) * ((x(4))^2) + ...
(w_af^2) * ((sin(x(1)))^3 * cos(x(1)) * (cos(x(3)))^4 + (sin(x(1)))^3 * cos(x(1)) * (sin(x(3)))^4  (cos(x(1)))^3 * sin(x(1)) ) + ...
2 * g_af * x(2) + ...
 2 * gcurr * sin(x(1)) * cos(x(1)) * sin(x(3)) * cos(x(3)); ...
x(4); ... %//= phi'
 x(2) * x(4) * cot(x(1)) + ...
(w_af^2) * (sin(x(1)))^2 * cos(x(3)) * sin(x(3)) *((cos(x(3)))^2 + (sin(x(3)))^2) + ...
2 * g_af * x(4) + ...
 gcurr * ((cos(x(3)))^2  (sin(x(3)))^2)];
end
So, w_af  frequency, g_af  attenuation parametr, gcurr  reverse to attenuation.
MY question is:
While I call my callDegrees(0.1,0.01,0) function nothing happens that is needed.
function f = callDegrees(w_af, g_af, gcurr)
x0=[pi/2; 0; 0.01; 0];
tspan = 0:0.1:500;
options = odeset('RelTol',1e2,'AbsTol',[1e3 1e3 1e3 1e3]);
[t,x] = ode45('parallelDegreesW4',tspan,x0, options, w_af, g_af, gcurr );
Any remarks would be helpful.
Can I optimise somehow my system?
Why my computer is doing this so slowly?
Whe ode15s gives terrible results when ode45 gives fine with the same Tolerances
