Why does MATLAB only run half of my formula?
2 views (last 30 days)
Show older comments
I've set up a function file and a script file in order to solve a set of ODEs.
As well as the 7 ODEs (dx/dt), the function involves several other functions/formulas that rely on time as well as variables from the ODEs.
I've noticed that for example, a function of C=2*t will run fine, changing through every cycle on debugging mode as t varies.
However, when the function is changed as intended to C=1-2*t, the function C remains as 1 for every cycle, even though t is changing.
Does anyone know why this is happening, and how I can solve it?
(I can happily post the code if needed, but it's extremely long, and this is the only bug to my knowledge)
3 Comments
Star Strider
on 20 Mar 2015
It may depend on what ‘m’ and ‘T’ and ‘y’ are, especially with respect to ‘t’.
Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!