[MITgcm-support] tsearch

Yuan Lian lian at ashimaresearch.com
Mon Jul 8 19:14:07 EDT 2013


Hi Angela,

You can replace tsearch line with the following:

%%%%%% the following only works for matlab version 2012 or later.
% Triangularize the data
tri=DelaunayTri(x,y);
if isempty(tri),
   warning('Data cannot be triangulated.');
   return
end

% Find the nearest triangle (t)
[t, bcs] = pointLocation(tri, xi, yi);

%%%%%%

Hope this helps.

Best,
Yuan


On 7/8/13 3:12 PM, Angela Zalucha wrote:
> Yes, I have found this page:
>
> http://www.mathworks.com/matlabcentral/fileexchange/authors/251793
>
> But I don't know what "p" corresponds to in griddata_preprocess.m, as 
> it is a black box to me.
>
>   Angela
>
> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
> Angela Zalucha, Ph.D.
> Research Scientist
> Search for Extraterrestrial Intelligence (SETI) Institute
>
>
> Office located at Southwest Research Institute
> 1050 Walnut Street, Suite 300
> Boulder, CO 80302
> USA
> (720) 208-7211
>
>
> http://www.seti.org/users/azalucha
> _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>
> On Mon, 8 Jul 2013, Menemenlis, Dimitris (3248) wrote:
>
>> Angela you are right, tsearch has been replaced by DelaunayTri 
>> function in recent matlab.
>> You could try replacing tsearch with DelaunayTri function in 
>> griddata_preprocess.m
>> But this routine is not needed for reading MITgcm files.
>> It is used for computing interpolation weights.
>>
>> Dimitris Menemenlis
>>
>> On Jul 8, 2013, at 5:50 PM, Angela Zalucha wrote:
>>
>>> Hi,
>>>
>>> I am running Matlab 2013a and I am unable to read in any files due 
>>> to a Matlab function that is no longer supported, tsearch.  This 
>>> function is called in the mitgcm-provided script 
>>> griddata_preprocess.m.  I checked the repository and there is no 
>>> update there.  Has anyone fixed this problem?
>>>
>>>  Angela
>>
>>
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list