No BSD License  

Highlights from
Surfer Griddata

4.08333

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

Surfer Griddata

by Aslak Grinsted

 

05 May 2006 (Updated 17 May 2006)

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

| Watch this File

File Information
Description

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

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

  Usage:
  [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
 
  methods:
    InverseDistance, Kriging(default), MinCurvature, NaturalNeighbor, NearestNeighbor, RadialBasis, Regression, Shepards, Triangulation
 
-------------------
Aslak Grinsted 2006

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

Acknowledgements
This submission has inspired the following:
Gridding function, using Surfer
MATLAB release MATLAB 7.1.0 (R14SP3)
Other requirements Golden Software Surfer (only tested in surfer7).
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (20)
09 May 2006 J. Luis

Not working. What is the txtsave function?

14 May 2006 Aslak Grinsted

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

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

10 Jun 2006 RR DD

Doesn't work, get this error:

??? Undefined command/function 'actxserver'.

Error in ==> surfergriddata at 82
 srf=actxserver('surfer.application');

Absolutely no idea what it means.

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.

09 Oct 2006 José Carlos Nunes  
20 Apr 2007 Dr.Jibendu Mantri

research

01 Aug 2007 Xingliang Huo

Thanks a lot!

10 Dec 2007 Sky Wood

good

10 Dec 2007 bobby SKUNE

interesting

10 Dec 2007 kitty abbey

appreciate

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.

05 Jan 2008 chen xb

thank you for your advising

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.

06 Sep 2008 wang peng

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

srf=actxserver('surfer.application');
%Surfer Griddata;export surfer .grd file;
invoke(srf,'griddata',......)
wds=invoke(srf.documents,'add',1);
%contourmap;
frame=invoke...(wds.shapes,'AddContourMap',outgrid)contourmap=frame.Overlays(1);
%then,I want to fill the contourmap,but error occured.
set(contourmap,'fillcontours',1);
??? Invoke Error: Unknown name or named argument
It means contourmap does not have fillcontour methods.It's different with surfer8 Automation.WHY?
THANKS!

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.

17 Jul 2009 Marcelo Lago

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

19 Feb 2010 Anthony Kendall

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

20 Aug 2010 csu go

What is srfDupAvg at 82 means?

03 May 2011 Luke Garden

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

Please login to add a comment or rating.
Updates
12 May 2006

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

17 May 2006

Better error handling and fixed a bug in the method selection code. (it always used kriging)

Tag Activity for this File
Tag Applied By Date/Time
griddata Aslak Grinsted 22 Oct 2008 08:24:33
surfer Aslak Grinsted 22 Oct 2008 08:24:33
kriging Aslak Grinsted 22 Oct 2008 08:24:33
min curvature Aslak Grinsted 22 Oct 2008 08:24:33
natural Aslak Grinsted 22 Oct 2008 08:24:33
nearest Aslak Grinsted 22 Oct 2008 08:24:33
neighbor Aslak Grinsted 22 Oct 2008 08:24:33
surfer Wolfgang Bier 05 Aug 2009 09:09:46
griddata Wolfgang Bier 05 Aug 2009 09:11:21
griddata Aslak Grinsted 19 May 2010 03:34:00
kriging lani liu 15 Aug 2010 23:16:45
kriging yuli zhang 15 Mar 2011 02:29:26
kriging jerry cheng 21 Apr 2011 04:58:31

Contact us at files@mathworks.com