No BSD License  

4.08333

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

Surfer Griddata

by

 

05 May 2006 (Updated )

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

data=load('datasvd.txt');
x=data(:,1);
y=data(:,2);
g=data(:,3);
spasigrid=250;
tixx=min(x):spasigrid:max(x);
tiy=min(y):spasigrid:max(y));
[XI,YI]=meshgrid(tix,tiy);
[Zi]=surfergriddata(x,y,g,XI,YI

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
thanks

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

03 May 2011 Luke Garden

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

20 Aug 2010 csu go

What is srfDupAvg at 82 means?

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

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!

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.

05 Jan 2008 chen xb

thank you for your advising

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

appreciate

10 Dec 2007 bobby SKUNE

interesting

10 Dec 2007 Sky Wood

good

01 Aug 2007 Xingliang Huo

Thanks a lot!

20 Apr 2007 Dr.Jibendu Mantri

research

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.

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.

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.

09 May 2006 J. Luis

Not working. What is the txtsave function?

Updates
12 May 2006

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

Contact us