Definite integral of two arrays with 400 values each.

1 Ansicht (letzte 30 Tage)
Martin Fertal
Martin Fertal am 7 Mai 2022
Kommentiert: Martin Fertal am 8 Mai 2022
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.

Akzeptierte Antwort

Matt J
Matt J am 7 Mai 2022
Bearbeitet: Matt J am 7 Mai 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)

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by