Problem 56255. Area under the curve
Compute area under the curve specified by points stored in y, where y is in range (0,inf) and x time step is 1.
note: please round the result to 4 decimals.
example: y=[1 2 3 5 8 9 10]
area=32.5000
Solution Stats
Problem Comments
-
2 Comments
Rafael S.T. Vieira
on 6 Nov 2022
what are the upper and lower bounds? [0,inf] diverges...
Rafael S.T. Vieira
on 7 Nov 2022
Ok, so I've figured it out. The area under the curve means using the interval from 1 to the number of points. And it's not a curve but a linear piecewise function. The problem's description should probably be fixed.
Solution Comments
Show commentsProblem Recent Solvers22
Suggested Problems
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1819 Solvers
-
Sum of odd numbers in a matrix
574 Solvers
-
Matlab Basics - Pick out parts of a vector
256 Solvers
-
894 Solvers
-
1434 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!