"yolanda " <email@example.com> wrote in message news:firstname.lastname@example.org... > Hi, > > I do appreciate your reply! > You are right. I also checked the triplequad function detailedly > yesterday. And as I defined, z should be a vector and then I can use the > function triplequad. > > So as you said, the two matrixs don't work. Then how should I define the f > function? > The exponentional part of the f function is just the part of the three > dimension > joint Gaussian distributation as following: > > exp( > ([(x-m1),(y-m2),(z-m3)]*(cov1)*[(x-m1);(y-m2);(z-m3)])./(-2) )./((sqrt(2*pi)).^3.*(sqrt(det(cov)))) > It has three matrixs operation. So how should I define?
If you need/want this to be written as an anonymous function, try using ARRAYFUN to operate on each element of z in turn, like: