Calculate volume encapsuled by two surfaces
7 次查看(过去 30 天)
显示 更早的评论
Hey guys,
I have following problem: I need to calculate the volume that is encapsuled by two surfaces (see pic). I can sample the surface points since it is represented as an sfit.
I tried to use integral2 like this:
fun1 = @(x,y) my_blue_fit(x,y);
fun2 = @(x,y) my_red_fit(x,y);
vol1 = integral2(fun1, -4, 4, -4, 4);
vol2 = integral2(fin2, -4, 4, -4, 4):
vol_total = vol1 - vol2;
However, this is obviously not correct since I only want the encapsuled volume, and not the integral across the whole FOV.
Can anyone help me to get the integral borders right? Thanks in advance!
(P.s.: The volume has an irregular shape, so it doesn't have a circular footprint or smth like that)
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Quadratic Programming and Cone Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!