Partial integral of a 2d interpolation

7 views (last 30 days)
cristina
cristina on 9 Aug 2017
Commented: cristina on 10 Aug 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 Comments
cristina
cristina on 10 Aug 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 on 10 Aug 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!

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!