Time Series of a Point in a SST Map

1 次查看(过去 30 天)
Hi all,
I am getting an error when I try to plot the timeseries of the data attached using the local function. How would I go about fixing this?
inputdirTS = 'C:\Users\';
filename =('TSavg.txt');
TS_cat = cat(3,TS{:});
lat = (-90:2.5:90);
lon = (-180:2.5:180);
imagescn(lon,lat,mean(TS_cat,3))
axis xy image
cmocean thermal
xlabel 'longitude';
ylabel 'latitude';
hold on
text(21.25 ,26.25,'1','color','red','horiz','center','vert','bot');
text(1.25 ,11.25,'2','color','red','horiz','center','vert','bot');
%% Location 1
gomlon1 = [18.75 18.75 23.75 23.75];
gomlat1 = [28.75 23.75 28.75 23.75];
[Lon,Lat] = meshgrid(lon,lat);
mask1 = geomask(Lat,Lon,gomlat1,gomlon1);
contour(Lon,Lat,double(mask1),[0.5 0.5],'b')
%% Timeseries Plot of Location 1
y = local(TS_cat,mask1);
figure(2);
plot(t,y);
axis tight
box off
Error Message
Error using local (line 56)
Input error: lat lon grids must match the first two dimensions of A.
Error in HW4_Prelim (line 105)
y = local(TS_cat,mask1);
Any tips or advise is appreciated. Thanks.
Warm regards,
John

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Orange 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by