Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Evaluate density with anonymous function and pdf defined over grid
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Christian

Posts: 32
Registered: 9/16/13
Evaluate density with anonymous function and pdf defined over grid
Posted: Sep 16, 2013 5:23 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,

I have an anonymous function with two arguments, x and y. I would like to evaluate the integral of this function over a finite range. I also have a pdf m that is defined over the relevant range. However, for the pdf I don't have a functional form, but only know its values at specific grid points. That is, m is a matrix over the range x=[1 35] and y=[1 2000] with 35*2000 elements. The grid is not equally spaced (it's log spaced).

I know how I can use 'integral2' to evaluate my anonymous function. But how can I add the pdf s.t. the integral reflects the different densities at each point of x and y? I've tried to use griddedInterpolant for m, but the Interpolant cannot be fed into integral2.

Thanks for your help.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.