MATLAB: Integral3 I use integrl3 to calculate a simple 4th integral but…

4d integralintegral

could you correct me with this code
fun=@(x,y,z,w)(x+y+z+w);
integral(@(w) integral3(fun,-1,1,-1,1,-1,1),-1,1,'ArrayValued',true)
it dose not work I don't know why!

Best Answer

integral(@(w) integral3(@(x,y,z) fun(x,y,z,w),-1,1,-1,1,-1,1),-1,1,'ArrayValued',true)
Related Question