how to solve differential equation in matlab
1 view (last 30 days)
Show older comments
dy/dz=beta(z)*y;
0 Comments
Accepted Answer
Torsten
on 11 Mar 2015
Do you know an antiderivative of beta(z),i.e. a function Beta(z) with the property that
d(Beta(z))/dz = beta(z) ?
Best wishes
Torsten.
2 Comments
Torsten
on 12 Mar 2015
The solution of your differential equation is given by
y(z)=y0*exp(integral_{z0}^{z} beta(z') dz')
if your initial condition for y is y(z0)=y0.
So if you have values for beta, use trapz to integrate from z0 to a given value of z. An approximate value for y(z) is then given by the above formula.
Best wishes
Torsten.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!