Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   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
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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?
> >
> > Thanks in advance!

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




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.