Interpolate N-D scattered data - MATLAB griddatan - MathWorks Deutschland (2024)

Interpolate N-D scattered data

collapse all in page

Syntax

vq = griddatan(x,v,xq)

vq = griddatan(x,v,xq,method)

vq = griddatan(x,v,xq,method,options)

Description

example

vq = griddatan(x,v,xq) fitsa hypersurface of the form v = f(x) tothe sample points x with values v.The griddatan function interpolates the surfaceat the query points specified by xq and returnsthe interpolated values, vq. The surface alwayspasses through the data points defined by x and v.

example

vq = griddatan(x,v,xq,method) specifies the interpolation method used to compute vq. Options are "linear" or "nearest".

vq = griddatan(x,v,xq,method,options) specifiesa cell array of character vectors, options, tobe used in Qhull via delaunayn.

Examples

collapse all

Fit Hypersurface

Open Live Script

Interpolate a 4-D scattered data set and visualize a 3-D isosurface of the interpolated data.

Create a scattered set of sample points.

rng defaultX = 2*rand([5000 3])-1;Y = sum(X.^2,2);

Create x, y, and z grids to use as the 3-D set of query points, and interpolate the scattered data at these points.

d = -0.8:0.05:0.8;[y0,x0,z0] = ndgrid(d,d,d);XI = [x0(:) y0(:) z0(:)];YI = griddatan(X,Y,XI);

Since it is difficult to visualize 4-D data sets, use isosurface at 0.8 to visualize the interpolation result.

YI = reshape(YI, size(x0));p = patch(isosurface(x0,y0,z0,YI,0.8));isonormals(x0,y0,z0,YI,p)p.FaceColor = "blue";p.EdgeColor = "none";view(3)axis equalcamlightlighting phong

Interpolate N-D scattered data - MATLAB griddatan- MathWorks Deutschland (1)

Nearest Neighbor Interpolation

Open Live Script

Use nearest neighbor interpolation on a 3-D scattered data set.

Create a sample 3-D data set. The matrix X contains the xyz locations of the observed data, and v contains the (randomly generated) observed data. This type of data set could represent, for example, oxygen levels in ocean water at these locations.

rng defaultX = [rand(100,1) rand(100,1) rand(100,1)];v = rand(100,1);

Use nearest neighbor interpolation to approximate the value of the underlying function at some query points.

[xx,yy,zz] = meshgrid(0:0.05:1);xq = [xx(:) yy(:) zz(:)];vq = griddatan(X,v,xq,"nearest");

Plot slices of the result on top of the sample point locations.

vq = reshape(vq,size(xx));plot3(X(:,1),X(:,2),X(:,3),"r*")hold onslice(xx,yy,zz,vq,[0.3 0.6],0.5,0.5)hold off

Interpolate N-D scattered data - MATLAB griddatan- MathWorks Deutschland (2)

Input Arguments

collapse all

xSample point coordinates
matrix

Sample point coordinates, specified as a matrix. Specify x asan m-by-n matrix to represent m pointsin n-dimensional space. The sample points mustbe unique.

Data Types: double

vSample values
vector

Sample values, specified as a vector. Specify v asa vector of length m, with one value for each samplepoint (row) specified in x.

If v contains complex numbers, then griddatan interpolatesthe real and imaginary parts separately.

Data Types: single | double
Complex Number Support: Yes

xqQuery points
matrix

Query points, specified as a matrix. Specify xq asa p-by-n matrix to represent p pointsin n-dimensional space. xq isusually created from a uniform grid produced by ndgrid.

Data Types: double

methodInterpolation method
"linear" (default) | "nearest" | []

Interpolation method, specified as one of the values in thistable. These methods are both based on a Delaunay triangulation ofthe input data.

OptionDescriptionContinuity
"linear" (default)Triangulation-based linear interpolation.C0
"nearest"Nearest neighbor interpolation.Discontinuous

If method is [], then griddatan uses the default "linear" method.

Data Types: char | string

optionsQhull-specific options
cell array | [] | {''}

Qhull-specific options, specified as a cell array. For a list of supported options, see Qhull Quick Reference.

If options is [], then griddatan usesthe default options:

  • {'Qt' 'Qbb' 'Qc'} for 2-D and 3-Dinterpolations.

  • {'Qt' 'Qbb' 'Qc' 'Qx'} for interpolationsin 4+ dimensions.

If options is {''}, then griddatan doesnot use any options, not even the defaults.

Data Types: cell

Output Arguments

collapse all

vq — Interpolated values
vector

Interpolated values, returned as a vector of length p.The interpolated values in vq correspond to thequery points (rows) in xq.

Tips

  • It is not practical to use griddatan forinterpolation in dimensions higher than about 6-D, because the memoryrequired by the underlying triangulation grows exponentially withthe number of dimensions.

  • Scattered data interpolation with griddatan uses a Delaunay triangulation of the data, so can be sensitive to scaling issues in x. When this occurs, you can use normalize to rescale the data and improve the results. See Normalize Data with Differing Magnitudes for more information.

Extended Capabilities

Version History

Introduced before R2006a

See Also

delaunayn | griddata | meshgrid

MATLAB-Befehl

Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:

 

Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.

Interpolate N-D scattered data - MATLAB griddatan- MathWorks Deutschland (3)

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: .

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

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)
  • 中国
  • 日本 (日本語)
  • 한국 (한국어)

Contact your local office

Interpolate N-D scattered data - MATLAB griddatan
- MathWorks Deutschland (2024)
Top Articles
PS4 - Broncos at Vikingsprod.static.vikings.clubs.nfl.com/assets/docs/2010-ps3-vs-denver.pdf · ps4 - broncos at vikings - 2 vikings-broncos game information vikings performances - [PDF Document]
Consumer Account Servicing Request - BECU - [PDF Document]
Beau Is Afraid Showtimes Near Island 16 Cinema De Lux
O Riley Auto Parts Near Me
No Hard Feelings Showtimes Near Metropolitan Fiesta 5 Theatre
William G. Nolan - Baker Swan Funeral Home
Academic Calendar Pbsc
Ups Advance Auto Parts
Lux Nails Columbia Mo
How to cancel subscriptions on your iPhone through the Settings app
Amazon Ups Drop Off Locations Near Me
Castle Nail Spa (Plano)
Magma Lozenge Location
Mta Bus Time Q85
Nyc Peep Show 2022
Uw Oshkosh Wrestling
Is Tql A Pyramid Scheme
Ninaisboring
Excuse Me This Is My Room Comic
Miller's Yig
The Legend of Zelda: Every Reincarnation of Princess Zelda Explained
Dell Optiplex 7010 Drivers Download and Update for Windows 10
Best Pizza Marlton
Littleton U Pull Inventory
Ringcentral Background
Parent Portal Support | Hamilton-Wentworth District School Board
Zmanim 10977
San Diego Cars And Trucks Craigslist
They Cloned Tyrone Showtimes Near Showbiz Cinemas - Kingwood
Andhrajyoti
Hyb Urban Dictionary
Remembering the names of those who died on 9/11
How Much Is 10000 Nickels
Raileydiesel
Recharging Iban Staff
Bridger Elementary Logan
Candy Land Santa Ana
Franchisee Training & Support | Papa Johns Pizza Franchise UK
Terrier Hockey Blog
Ourfig
Alineaciones De Rcd Espanyol Contra Celta De Vigo
Nsfw Otp Prompt Generator Dyslexic Friendly
New York Rangers Hfboards
Meshuggah Bleed Tab
Toxic Mold Attorney Near Me How To File A Toxic Mold Lawsuit Sample Complaint In Apartment Mold Case
Ehc Workspace Login
Csuf Mail
Backrooms Level 478
Items For Sale in Le Mars, IA
Bookoo Garage Sales
Latest Posts
Article information

Author: Kimberely Baumbach CPA

Last Updated:

Views: 5531

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Kimberely Baumbach CPA

Birthday: 1996-01-14

Address: 8381 Boyce Course, Imeldachester, ND 74681

Phone: +3571286597580

Job: Product Banking Analyst

Hobby: Cosplaying, Inline skating, Amateur radio, Baton twirling, Mountaineering, Flying, Archery

Introduction: My name is Kimberely Baumbach CPA, I am a gorgeous, bright, charming, encouraging, zealous, lively, good person who loves writing and wants to share my knowledge and understanding with you.