Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read xy tem #1

Open
TCFAA opened this issue Aug 28, 2017 · 0 comments
Open

read xy tem #1

TCFAA opened this issue Aug 28, 2017 · 0 comments

Comments

@TCFAA
Copy link
Owner

TCFAA commented Aug 28, 2017

clc;
clear;
lon=ncread('TEM.nc','lon');%读取经度
lat=ncread('TEM.nc','lat');%读取纬度
air=ncread('air2016.nc','air');%读取气温
air1=permute(air,[2,1,3]);%第一第二维度转置
j=[]
for day=1:366
air2=air1(27,45,day);
j=[j,air2];
end
j=j-273.15;
m=mean(j);
m1=m*ones(1,366);
plot(m1,'LineWidth',2,'LineStyle','-.','Color',[1 0 0]);
hold on
plot(j);
grid off
title({'2016年逐日平均气温曲线';'地点:25N 110E'})
xlabel('day','FontSize',12)
ylabel('tem','FontSize',12)
set(gca,'xlim',[1 366]);
% set(gca,'xticklabel',1:1:12)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant