Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: to find fast function for interpolating irregular grid data to regular grid
Replies: 4   Last Post: Mar 16, 2012 9:33 AM

 Messages: [ Previous | Next ]
 Minimax Posts: 12 Registered: 1/23/09
Re: to find fast function for interpolating irregular grid data to
Posted: Mar 14, 2012 5:54 AM

Greg Heath <g.heath@verizon.net> wrote in message <31194edf-dc45-4035-b898-2a847367a847@gr6g2000vbb.googlegroups.com>...
> On Mar 13, 4:01 am, "Minimax " <as...@mail.ru> wrote:
> > Hi!
> >
> > I have a lot of data at irregular grid  and
> > I 'm trying to do some interpolation to regular grid using griddata function.
> > But it is very slow function.
> > Does anybobody advice me another usefull function for interpolationg data?
> >

>
> Dimensions of the data matrix?
>
> What are you using now?
>
> Greg

Here is a part of my matlabe code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
latv=zeros([218 200]);
lonv=zeros([218 200]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=1:218
for j=1:200
latv(i,j)=s1(j,i); %latr(j);a(i,1)
lonv(i,j)=s2(j,i); %lonr(i);a(i,2)
end;
end;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cellsize = 2.5;
latlim = [floor(min(lat(:))),ceil(max(lat(:)))];
lonlim = [floor(min(lon(:))),ceil(max(lon(:)))];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
griddedmap = griddata(lonv, latv, slp,...
cellsize/2 + lonlim(1):cellsize:lonlim(2),...
cellsize/2 + (latlim(1):cellsize:latlim(2))');

It works too slowly(
There is maybe another function to do fast calculating.

Thanks!

Date Subject Author
3/13/12 Minimax
3/13/12 Matt J
3/13/12 Greg Heath
3/14/12 Minimax
3/16/12 Matt J