Partial integral of a 2d interpolation

11 visualizzazioni (ultimi 30 giorni)
cristina
cristina il 9 Ago 2017
Commentato: cristina il 10 Ago 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 Commenti
cristina
cristina il 10 Ago 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 il 10 Ago 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!

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by