I am looking to extract data on a plane of a scalar field in Matlab so that I can integrate over the area of the slice and find the average quantity.
Is it possible to use the slice tool in Matlab to get the 3D data that intersects with my slice into an N*M array, where each index represents the location in space? My goal is to eventually integrate over the surface (the slice) to find the average value of the scalar quantity.
I know that I can call a vector of handles h = slice(...) but I'm not very familiar with the slice tool, so I don't know what to input and then what handles will be useful.
Also, I would like to define my slice by 4 vertices a,b,c, and d which I have already defined. Is this possible or do I need to input 3 'position' vectors that define the location of each edge of my slice?
Thanks in advance!