DaniSb170 / nctoolbox

Automatically exported from code.google.com/p/nctoolbox
0 stars 0 forks source link

error when running geodemo2.m #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.run geodemo2.m using Matlab R2012a

What is the expected output? What do you see instead?
The demo should produce a vertical slice along a transect.  Instead the program 
terminates with the following error message.

Error using tsearch (line 17)
TSEARCH has been removed. Use DelaunayTri/pointLocation instead.

Error in griddata_lite (line 80)
      t = tsearch(x,y,tri,xi,yi);

Error in vsliceg (line 93)
vdata(1,:) = griddata_lite ( njGrid.lon, njGrid.lat, squeeze(njData(1,:,:)),
slice_x, slice_y );

Error in geodemo_2 (line 34)
[x,y,vdata] = vsliceg(data,grd,lon,lat);

What version of the product are you using? On what operating system?
nctoolbox-20120405 

Please provide any additional information below.

To update the code, which seems to have resolved the issue with geodemo_2.m,  I 
made the following modifications to griddata_lite.m. 

Line 71 was replaced with

tri = DelaunayTri(x,y);

Line 80 was replaced with

t = pointLocation(tri,xi,yi);

Line 127 was replaced with

k = nearestNeighbor(dt,xi,yi);

Overall, a very nice toolbox. Thanks, John

Original issue reported on code.google.com by john.leh...@gmail.com on 3 Aug 2012 at 6:04

GoogleCodeExporter commented 8 years ago

Original comment by crosb...@gmail.com on 5 Nov 2012 at 9:02