Calculate Volume of a Matrix

13 views (last 30 days)
Nels
Nels on 31 Mar 2011
Commented: Image Analyst on 24 Oct 2014
I have a Matrix which I have turned into a 3D image using mesh. How can I calculate the volume of this matrix? I am trying to find total displacement across the Matrix.

Answers (2)

Walter Roberson
Walter Roberson on 31 Mar 2011
You could go row by row and trapz(), sum all of those, multiply by the row width to get the volume.
  2 Comments
eevee
eevee on 24 Oct 2014
Hi Walter,
I've got a similar question to Nels, I guess. I'm new to MATLAB.
I have plotted a bathymetry from xyz data file. Now, I have to calculate its volume. How should I do it?
Hope to hear from you soon!
Thanks,
Eve
Image Analyst
Image Analyst on 24 Oct 2014
Start your own question (a new, separate question/discussion) and attach your data file and m-code to read it into your volumetric array.

Sign in to comment.


Jan
Jan on 31 Mar 2011

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!