select a point from nc lat/lon grid and plot time series of sla

1 view (last 30 days)
Hi I have sea level anomaly gridded data set for 12 months, one sla value per nc file per month. this data is in 60 by 60 by 12 double format meaning that 60 long by 60 lat grid has one value of sla for 12 months. I want to interactively select a point on the grid and then plot a time series of the mean sla vs time. I have written a code as follows but it does not work for sla due to different data type. It works well for the lat and lon fields which I have extracted but not for sla and gives me following error:Error using Plot, Data cannot have more than 2 dimensions.
if true
% Time Series Plots
figure(1)
subplot(3,1,1)
plot(dtime,lat,'.')
datetick('keeplimits');
ylabel('lat(N)')
subplot(3,1,2)
plot(dtime,lon,'.')
datetick('keeplimits');
ylabel('lon(N)')
% subplot(3,1,3)
% plot(dtime,sla_subset(1,1,:),'.')
% datetick('keeplimits');
% ylabel('normal data value for each month')
% xlabel 'month of year'
end

Answers (0)

Categories

Find more on Visual Exploration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!