Definite integral of two arrays with 400 values each.

4 vues (au cours des 30 derniers jours)
Martin Fertal
Martin Fertal le 7 Mai 2022
Commenté : Martin Fertal le 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.

Réponse acceptée

Matt J
Matt J le 7 Mai 2022
Modifié(e) : Matt J le 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)
  1 commentaire
Martin Fertal
Martin Fertal le 8 Mai 2022
Yes that's exatly what i need. Thak you, it helped me a lot.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by