how to solve differential equation in matlab

1 view (last 30 days)
dy/dz=beta(z)*y;

Accepted Answer

Torsten
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
Arjun Kumar
Arjun Kumar on 11 Mar 2015
yes i have different values of beta(z).now i want to plot graph between beta(z) and y.how can i do
Torsten
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.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!