how can I write a code to solve an integral (from 0 to t) which only has the initial function (at t=0)?
3 views (last 30 days)
Show older comments
I want to do an integral and only have the initial function for it. Assuming a y function, it is in this way: y=integration (over the range of 0 to t) of (derivation of y with respect to distance) dt and suppose initial condition is a constant number. I am going to write it as a summation of the areas by time steps(n steps) to get the final equation as a result of integral. Do you have any suggestion that how can I make it works in MATLAB? Thanks for you time and help
0 Comments
Accepted Answer
John D'Errico
on 5 Oct 2015
Edited: John D'Errico
on 5 Oct 2015
This is normally called an ordinary differential equation. Your idea for solving it is effectively Euler's method, usually a poor choice if others are available.
help ode45
More Answers (0)
See Also
Categories
Find more on Performance and Memory 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!