Integration of a function with respect to a dummy variable
Show older comments

How to evaluate the integral ?
f(x) is integrated over a dummy variable z. Please note that x ((x(i) >= 0 or x(i) < 0)) is an array of n x 1 , and f(x) is a corresponding array of n x 1. I do not have the closed form expression for f(x), nor is curve fitting an option to approximate the data as an expression. How do I find corresponding vector A.
Kindly direct me to appropriate approach to solve this issue.
Accepted Answer
More Answers (2)
Hiro Yoshino
on 6 May 2020
1 vote
Why don't you think about using Symblic Math Toolbox?
You can manipulate your equation as you wish.
1 Comment
Nikhil Yewale
on 6 May 2020
Hiro Yoshino
on 6 May 2020
1 vote
f = [-0.9 -0.5 0.4 0.3 0 -0.3 -0.5 0.5]
let me assume z to be:
z = [0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0]
and
then
If you prefer continous manner, you should either approximate f as a function or interpolate the discrete numbers.
1 Comment
Nikhil Yewale
on 6 May 2020
Categories
Find more on Numerical Integration and Differentiation 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!