Partial integral of a 2d interpolation

7 次查看(过去 30 天)
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 个评论
cristina
cristina 2017-8-10
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 2017-8-10
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!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by