How to solve ordinary differential equation?

1 view (last 30 days)
Please Check my code.

Answers (1)

Walter Roberson
Walter Roberson on 28 Sep 2015
It looks like code.
It looks like code that does not define "n" before using it.
It looks like code that has no comments.
It looks like code that does not pre-allocate arrays.
It looks like code that could have its performance improved by calculating (C(i+1)-C(i))*V once per loop and then using that result multiple times.
Does it solve the ODE properly? We don't know, since you did not document the ODE to be solved.

Community Treasure Hunt

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

Start Hunting!