Integrate a step function

I was wondering if I could calculate the above integral, where f is the exponential density function and x is a vector.
x=linspace(0,0.1,5);
Any help will be greatly appreciated.

Réponses (1)

Walter Roberson
Walter Roberson le 18 Fév 2017

0 votes

Your notation is not clear. There is no obvious meaning to integrating with a vector. If you want to produce a vector of integrals then you can use the VectorValued option of integral()
Your title mentions stepwise function but there is no obvious stepwise function in your variable of integration, y.
If you do have a function that is stepwise in your variable of integration be sure to use the Waypoints option of integral()

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by