how to save and plot different matrix?

1 次查看(过去 30 天)
Lilya
Lilya 2018-11-4
Hi all,
I've written the following code to get the matrix of SST (sea surface temperature), but also I want to get the plot of each sst matrix that should be extracted from each file (92:140) = 49. also I need to save get each matrix alone and save all of 49 in one .mat file but different variable.
I donno where I am mistaken. any help would be appreciated. Thanks
for i=92:140;
% filename=[files(i).name];
% disp(['Processing ', files(i).name]);
% sst = ncread(filename,'sea_surface_temperature');
% lon = ncread(filename,'lon');
% lat = ncread(filename,'lat');
% sst = sst';
idxlon = find(lon>lonmin & lon<lonmax);
goodlon = lon(idxlon);
idxlat = find(lat>latmin & lat<latmax);
goodlat = lat(idxlat);
subset_sst = sst(idxlat,idxlon); %this is the data i want
y=files(i).name(1:4);
dd=files(i).name(7:8);
mm=files(i).name(5:6);
DT=strcat(dd,'/',mm,'/',y);
DAY=[DAY;DT];
figure
imagesc(goodlon,goodlat,subset_sst) %plot this line separtly
axis xy tight
end

回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by