Problen with ODE45 Results

1 Ansicht (letzte 30 Tage)
babak dindar safa
babak dindar safa am 16 Jul. 2016
Bearbeitet: babak dindar safa am 16 Jul. 2016
Hi guys , I'm currently working on a code that would solve me this equation :
i don't know why its not returning the correct answer. what am i doing wrong here?
[t,dz] = ode45(@newz,t,[0],[],factor_A,mass,factor_c,factor_alc,factor_Fy,factor_Uy,factor_beta,factor_gamma,factor_n,xdata,dxdata,t);
and the function
function dz = newz(t,z,A,m,c,a,Fy,Uy,beta,gamma,n,x,dx,dt)
dxt = interp1(dt,dx,t,'pchip');
dz = dxt * (a - ((beta * sign(dxt * z) + gamma) * abs(z)^n));
end

Antworten (1)

John D'Errico
John D'Errico am 16 Jul. 2016
The crystal ball is sooooo foggy. I cannot see into your mind to know what you have done wrong, since you show us only one line, nor can I see into your computer. No information posted about any call to ODE45, no functions, no hint of what you are doing. Nothing of value for us to help you.
The Tarot cards were able to point out one thing, that you may come into money next month. Send some of it to me, please. :)
Ok, do you want me to be serious? If I had to guess, it looks like the line of code and the equation seem to have the roles of beta and gamma swapped. Hey, it is the only guess I can offer based on no information.
By the way, using the names gamma or beta are bad things to do, since there are already very useful functions with those names. One day soon, you will post an anguished question like "Why do my calls to the special functions gamma and beta not work properly?"
  1 Kommentar
babak dindar safa
babak dindar safa am 16 Jul. 2016
Bearbeitet: babak dindar safa am 16 Jul. 2016
aren't you a funny one. thanks for your reply though. edited the post and added the code.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by