From: anila alex on 1 Mar 2010 07:00 I have a latitude x longitude matrix with data points at 0 ,1, 2, 3, 4....etc along Y direction(ie latitude ) and 0,1.25,2.5,3.75.....along X direction (longitude) and i need a matrix with data at points 0, 2.5, 5...etc both in X and Y direction. when tried interp2 with X=0:1:40 and Y=0:1.25:44.25 and Z=data i have(41x35 matrix) it came that X and Y must have same size as Z Please Help. Thanks for your time Anila
From: Matt J on 1 Mar 2010 07:13 "anila alex" <anila.atmos(a)gmail.com> wrote in message <hmga8m$1rl$1(a)fred.mathworks.com>... > I have a latitude x longitude matrix with data points at 0 ,1, 2, 3, 4....etc along Y direction(ie latitude ) and 0,1.25,2.5,3.75.....along X direction (longitude) and i need a matrix with data at points 0, 2.5, 5...etc both in X and Y direction. > when tried interp2 with X=0:1:40 > and Y=0:1.25:44.25 > and Z=data i have(41x35 matrix) > it came that X and Y must have same size as Z ============== I'll ask the obvious question. Why do you have X and Y which do not agree in size with Z?
From: us on 1 Mar 2010 07:14 "anila alex" <anila.atmos(a)gmail.com> wrote in message <hmga8m$1rl$1(a)fred.mathworks.com>... > I have a latitude x longitude matrix with data points at 0 ,1, 2, 3, 4....etc along Y direction(ie latitude ) and 0,1.25,2.5,3.75.....along X direction (longitude) and i need a matrix with data at points 0, 2.5, 5...etc both in X and Y direction. > when tried interp2 with X=0:1:40 > and Y=0:1.25:44.25 > and Z=data i have(41x35 matrix) > it came that X and Y must have same size as Z > Please Help. > Thanks for your time > Anila well... what a surprise... show CSSM the syntax of your call to INTERP2... us
From: anila alex on 2 Mar 2010 23:20 "us " <us(a)neurol.unizh.ch> wrote in message <hmgb2d$k9l$1(a)fred.mathworks.com>... > "anila alex" <anila.atmos(a)gmail.com> wrote in message <hmga8m$1rl$1(a)fred.mathworks.com>... > > I have a latitude x longitude matrix with data points at 0 ,1, 2, 3, 4....etc along Y direction(ie latitude ) and 0,1.25,2.5,3.75.....along X direction (longitude) and i need a matrix with data at points 0, 2.5, 5...etc both in X and Y direction. > > when tried interp2 with X=0:1:40 > > and Y=0:1.25:44.25 > > and Z=data i have(41x35 matrix) > > it came that X and Y must have same size as Z > > Please Help. > > Thanks for your time > > Anila > > well... what a surprise... > show CSSM the syntax of your call to INTERP2... > > us This is the syntax a=meshgrid(0:40); b=meshgrid(58.75:1.25:101.25); c=load(fgy); ai=0:2.5:40; bi=60:2.5:100; ci=interp2(a,b,c,ai,bi); Thanks Anila
From: anila alex on 2 Mar 2010 23:29 "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hmgb0h$grf$1(a)fred.mathworks.com>... > "anila alex" <anila.atmos(a)gmail.com> wrote in message <hmga8m$1rl$1(a)fred.mathworks.com>... > > I have a latitude x longitude matrix with data points at 0 ,1, 2, 3, 4....etc along Y direction(ie latitude ) and 0,1.25,2.5,3.75.....along X direction (longitude) and i need a matrix with data at points 0, 2.5, 5...etc both in X and Y direction. > > when tried interp2 with X=0:1:40 > > and Y=0:1.25:44.25 > > and Z=data i have(41x35 matrix) > > it came that X and Y must have same size as Z > ============== > > I'll ask the obvious question. Why do you have X and Y which do not agree in size with Z? because the matrix has 41 rows and 35 columns so i took x=meshgrid(0:1:40) and y=(0:1.25:44.25) Anila
|
Pages: 1 Prev: Aerosim/MATLAB/SIMULINK UAV simulation Next: Remove all spaces in string |