Partial integral of a 2d interpolation

7 vues (au cours des 30 derniers jours)
cristina
cristina le 9 Août 2017
Commenté : cristina le 10 Août 2017
Hi there,
I have an interpolated 2d function defined using griddedInterpolant and I need to integrate over one of its arguments. I can't seem to find how to do it. I get the error:
Error using scatteredInterpolant/subsref
The input data has inconsistent size.
I can't make the inputs discrete and use trapz, I need the continous integral.
  5 commentaires
cristina
cristina le 10 Août 2017
I have not used integral2 because I don't want to do a double integral. I want to fix one of the arguments and integrate over the other.
cristina
cristina le 10 Août 2017
I got it. I have to give it the 'ArrayValued' option.
integral(@(w)VT0(50,w)0,100,'ArrayValued',1)
Thanks for the help anyways!

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Numerical Integration and Differentiation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by