Skip to content
MathWorks - Mobile View
  • Melden Sie sich bei Ihrem MathWorks Konto anMelden Sie sich bei Ihrem MathWorks Konto an
  • Access your MathWorks Account
    • Eigener Account
    • Mein Community Profil
    • Lizenz zuordnen
    • Abmelden
  • Produkte
  • Lösungen
  • Forschung und Lehre
  • Support
  • Community
  • Veranstaltungen
  • MATLAB erhalten
MathWorks
  • Produkte
  • Lösungen
  • Forschung und Lehre
  • Support
  • Community
  • Veranstaltungen
  • MATLAB erhalten
  • Melden Sie sich bei Ihrem MathWorks Konto anMelden Sie sich bei Ihrem MathWorks Konto an
  • Access your MathWorks Account
    • Eigener Account
    • Mein Community Profil
    • Lizenz zuordnen
    • Abmelden

Videos und Webinare

  • MathWorks
  • Videos
  • Videos Homepage
  • Suche
  • Videos Homepage
  • Suche
  • Vertrieb kontaktieren
  • Testsoftware
5:50 Video length is 5:50.
  • Description
  • Related Resources

Integrating to Find the Volume Underneath a Set of Nonuniformly Spaced Data

(Originally posted on Doug's MATLAB Video Tutorials blog.)

This video covers the use of GRIDDATA, anonymous functions, and QUAD2D to integrate the volume under a set of randomly spaced data points. First an interpolation scheme must be put in place, then a numeric quadrature function is invoked. This video shows the creation of a good synthetic data set with a known volume to test the rest of the algorithm. A good test data set like this really give confidence in the building of your algorithm.

Here is the code that was written: "I have a dataset "A" (n by 3) of ordered triplets [x,y,z]. I want to calculate the volume between surface defined by "A" and the xy plane. "A" has only positive values but is not uniformly spaced and not gridded. "A" cannot be described by a simple function. Any help?"

n = 10;
randOffset = 0.1;
h = 1;

x = rand(n);
x(1:4)=[0 1 0 1]';
y = rand(n);
y(1:4)=[0 0 1 1]';
z = h + randOffset*rand(n) - randOffset/2; %make average height


plot3(x,y,z,'.')
axis equal
zlim([0 h + randOffset])

interpZ = @(xi,yi) griddata(x,y,z,xi,yi) %set up interpolation

interpZ(0.5,0.5) %test interpolation
vol = quad2d(interpZ,0,1,0,1) %volume should be close to 1

Note: there is an update to this post here.

Recorded: 8 Sep 2009

Related Products

  • MATLAB

Bridging Wireless Communications Design and Testing with MATLAB

Read white paper
Related Information
Related Information
MATLAB Video Blog

Feedback

Featured Product

MATLAB

  • Request Trial
  • Get Pricing

Up Next:

46:45
Tire Modeling: Extracting Results from a Large Data Set

Related Videos:

3:44
Making a Sweeping Slice Through Volume of Data
3:01
Linearly Spaced Vectors
4:19
Volume Visualization, Part 4: Display of Contourslice and...
5:06
Volume Visualization, Part 9: Unifying Example

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

  • Switzerland (English)
  • Switzerland (Deutsch)
  • Switzerland (Français)
  • 中国 (简体中文)
  • 中国 (English)

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • Vertrieb kontaktieren
  • Testsoftware

MathWorks

Accelerating the pace of engineering and science

MathWorks ist der führende Entwickler von Software für mathematische Berechnungen für Ingenieure und Wissenschaftler.

Entdecken Sie…

Produkte

  • MATLAB
  • Simulink
  • Software für Studierende
  • Hardware-Unterstützung
  • File Exchange

Testen oder Kaufen

  • Downloads
  • Testsoftware
  • Vertrieb kontaktieren
  • Preise und Lizenzierung
  • Store

Lernen

  • Dokumentation
  • Tutorials
  • Beispiele
  • Videos und Webinare
  • Schulungen

Support

  • Hilfe zur Installation
  • MATLAB Answers
  • Consulting
  • License Center
  • Support kontaktieren

Über MathWorks

  • Jobs & Karriere
  • Newsroom
  • Soziales Engagement
  • Berichte von Anwendern
  • Über MathWorks
  • Select a Web Site United States
  • Trust Center
  • Handelsmarken
  • Datenschutz
  • Datendiebstahl verhindern
  • Status von Anwendungen

© 1994-2022 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

Folgen Sie uns