Integrating a staircase function multiplied by another continuous function

2 views (last 30 days)
Curious if there exists any matlab functions that allow me to integrate the product of a staircase function (discontinuous) and another 2 different continuous functions (symbolically)?
The three functions that I am trying to integrate over are the probability density function, matlab floor function(staircase), and another linearly decreasing function. All of them depend upon the same variable, and am integrating the functions with respect to that variable.
s=const
m is a linearly decreasing function
u=const
int(normpdf(delta)*fix(delta/s)*m(delta),delta,0,u)
One potential solution is to split the integral into many continuous intervals and sum the result, making the fix function constant along each of those intervals. Unfortunately, this is a clunky solution. Are there matlab function that would help me do this without a for loop? If there isn't a function in matlab, is there an easier solution than the one I came up with?

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!