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.

回答(1 个)

Walter Roberson
Walter Roberson 2017-2-18

0 个投票

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()

类别

帮助中心File Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by