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.

Answers (1)

Walter Roberson
Walter Roberson on 18 Feb 2017
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()

Asked:

on 18 Feb 2017

Answered:

on 18 Feb 2017

Community Treasure Hunt

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

Start Hunting!