No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Surfer Griddata

4.1 | 12 ratings Rate this file 13 Downloads (last 30 days) File Size: 3.85 KB File ID: #10986 Version: 1.0

Surfer Griddata


Aslak Grinsted (view profile)


05 May 2006 (Updated )

A gridding interface with surfer (v7). Works just like griddata.

| Watch this File

File Information

A replacement for griddata for those that have golden softwares Surfer.

(Very fast compared to griddata for my test dataset!)

  [Xi,Yi,Zi]=surfergriddata(X,Y,Z,Xi,Yi,method) or
  [Xi,Yi,Zi]=surfergriddata(X,Y,Z) or
  [Zi]=surfergriddata(X,Y,Z,Xi,Yi,method) or
    InverseDistance, Kriging(default), MinCurvature, NaturalNeighbor, NearestNeighbor, RadialBasis, Regression, Shepards, Triangulation
Aslak Grinsted 2006

NOTE: Requires Golden Software Surfer (only tested in surfer7).


This file inspired Gridding Surfer.

MATLAB release MATLAB 7.1.0 (R14SP3)
Other requirements Golden Software Surfer (only tested in surfer7).
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (23)
29 Feb 2012 tofan cloverst

finally i found the solution for Luke Garden and me related to specify the grid spacing. You can try to specify the grid like this:


Comment only
29 Feb 2012 tofan cloverst

if we wanto to use this command [Xi,Yi,Zi]=surfergriddata(X,Y,Z,Xi,Yi,method)

what must be filled in Xi and Yi?
i hope we can input the grid spacing in there

Comment only
29 Feb 2012 tofan cloverst

i have some problem with specify the grid spacings because the adjusment of grid spacing is quite important for depth estimating

Comment only
03 May 2011 Luke Garden

Is there any way to add some code to specify the grid spacings?

20 Aug 2010 csu go

csu go (view profile)

What is srfDupAvg at 82 means?

Comment only
19 Feb 2010 Anthony Kendall

Nice, simple function that can easily be modified to add additional options to the interpolations. Thanks!

17 Jul 2009 Marcelo Lago

Working fine by using Surfer version 9.3.451 and MatLab version (R2008a)

12 Sep 2008 Milan Zukovic

I'm getting the same error as huli huo even using surfer 7. Any idea?
??? Invoke Error, Dispatch Exception:
Source: Surfer.Application.1
Description: Parameter 9 must be >= 2 and <= 10000
Module Surfer, File D:\gs\Surfer7\Automation\Automation.cpp, Line 381
Help File: C:\Program Files (x86)\Golden Software\Surfer\Surfer.hlp
Help Context ID: 13e1.

Comment only
06 Sep 2008 wang peng

Some people help me solve this problem?
I want Painting contour with Surfer8 in Matlab7.0,my program is:

%Surfer Griddata;export surfer .grd file;
%then,I want to fill the contourmap,but error occured.
??? Invoke Error: Unknown name or named argument
It means contourmap does not have fillcontour methods.It's different with surfer8 Automation.WHY?

Comment only
04 Mar 2008 Aslak Grinsted

It works. You just need Surfer v7 as it says in the documentation above (huli huo has v8). If you want it to work in v8 then you need to modify it abit according to your new documentation.

Comment only
05 Jan 2008 chen xb

thank you for your advising

Comment only
10 Dec 2007 huli huo

Does not work, and error message:
??? Invoke Error, Dispatch Exception:
Source: Surfer.Application.1
Description: Parameter 9 must be >= 2 and <= 10000
Help File: C:\PROGRA~1\Golden Software\Surfer8\Surfer.chm
Help Context ID: 313e1.

10 Dec 2007 kitty abbey


10 Dec 2007 bobby SKUNE


10 Dec 2007 Sky Wood


01 Aug 2007 Xingliang Huo

Thanks a lot!

20 Apr 2007 Dr.Jibendu Mantri


09 Oct 2006 José Carlos Nunes

12 Jun 2006 Aslak Grinsted

It means that you don't have surfer installed properly (ie with activex support). Did you read the help? Note that golden software surfer (v7) is required. I will update the code to give a more telling error description.

If you dont have surfer, then i recommend gridfit also found on matlabcentral.

Comment only
10 Jun 2006 RR DD

Doesn't work, get this error:

??? Undefined command/function 'actxserver'.

Error in ==> surfergriddata at 82

Absolutely no idea what it means.

24 May 2006 Wolfgang Schwanghart

Works pretty fine after a modification. In line 79 the function txtsave is not working. I changed it to dlmwrite and it worked...

14 May 2006 Aslak Grinsted

The txtsave dependency has been removed and that problem has been fixed.

Comment only
09 May 2006 J. Luis

Not working. What is the txtsave function?

Comment only
12 May 2006

Fixed broken code... The old version relied on a homemade function (txtsave). Now it uses matlabs save.

Contact us