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: Griding data
Replies: 4   Last Post: Apr 4, 2012 10:06 AM

 Messages: [ Previous | Next ]
 Shaik Ghouse Basha Posts: 26 Registered: 6/15/09
Re: Griding data
Posted: Apr 3, 2012 11:51 PM

I have X Y Z of length 13000 like this i have 16700 columns of data
for j=1
eps1=1.5;
Eda=nan(length(lat1),length(lon1));
for k=1:length(Z)

P1=find(lat1>=Y(k)-eps1 & lat1<=Y(k)+eps1);
Q1=find(lon1>=X(k)-eps1 & lon1<=X(k)+eps1);
if length(P1)>1
P1=P1(1);
end
if length(Q1)>1
Q1=Q1(1);
end

Eda(P1,Q1)=nanmean([Eda(P1,Q1) Z(k)]);
end
end

"Nasser M. Abbasi" <nma@12000.org> wrote in message <jlgfdf\$ujr\$2@speranza.aioe.org>...
> On 4/3/2012 10:14 PM, Shaik Ghouse Basha wrote:
> > Dear Friends, I am facing problem in Griding data in matlab.
> >I have written the code but its taking sooo much time to process.
> >My data contains X(longitude) Y(latitude) Z(data points) with 0.5 degree
> >resolution. I have to make this data gridding with 1.5x1.5 degree
> >through all the griding programs in mathworks.com.

>
> It will help others help you more by making small example
> of the problem, post the complete code of the small example
> here.
>
>
> --Nasser
>

Date Subject Author
4/3/12 Shaik Ghouse Basha
4/3/12 Nasser Abbasi
4/3/12 Shaik Ghouse Basha
4/4/12 Derek Goring
4/4/12 Andrew