Definite integral of two arrays with 400 values each.

3 views (last 30 days)
Hello
I have to calculate S/P ratio by this formula. The problem is that i have no idea how to itegrate it. S, V and V' are arrays with 400 values, for example V = [2e-4 2.2821e-4 2.6109e-4 2.9936e-4 ... 1.499e-5]. K'm and K are constants. Lower limit of the integral is 380 and upper is 480.

Accepted Answer

Matt J
Matt J on 7 May 2022
Edited: Matt J on 7 May 2022
I would imagine you have a vector of 400 lambda values as well. Then you could do,
numerator=trapz(lambda, S.*Vprime);
denominator=trapz(lambda, S.*V);
ratio=numerator/denominator*(Kmprime/Km)

More Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!