- 积分
- 1834
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-11-19
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
clc
x=[1:1:4317]';
data=load('g:\9202122\09.txt');
z=data(:,8); %风速分钟变率
y=data(:,7); %平均风速
figure
scatter(x,y,5,z) %散点图
axis([0 4317 0 18])
set(gca,'XTick',[59 119 179 239 299 359 419 479 539 599 659 719 779 839 899 959 1019 ...
1079 1139 1199 1259 1319 1379 1439 1498 1558 1618 1678 1738 1798 1858 1918 1978 2038 ...
2098 2158 2218 2278 2338 2398 2458 2518 2578 2638 2698 2758 2818 2878 ...
2937 2997 3057 3117 3177 3237 3297 3357 3417 3477 3537 3597 3657 3717 3777 ...
3837 3897 3957 4017 4077 4137 4197 4257 4317])
set(gca,'XTickLabel',{'00','01','02','03','04','05','06','07','08', ...
'09','10','11','12','13','14','15','16','17','18','19','20', ...
'21','22','23','00','01','02','03','04','05','06','07','08', ...
'09','10','11','12','13','14','15','16','17','18','19','20', ...
'21','22','23','00','01','02','03','04','05','06','07','08', ...
'09','10','11','12','13','14','15','16','17','18','19','20', ...
'21','22','23'})
set(gca,'FontSize',8)
xlabel('时间(h)')
ylabel('平均风速(m/s)')
h=legend('风速分钟变率');
set(h,'FontSize',10)
figure
[X,Y,Z]=griddata(x,y,z,linspace(1,4317)',linspace(1.47,16.19),'v4');%插值
pcolor(X,Y,Z);shading interp %伪彩色图
axis([0 4317 0 18])
set(gca,'XTick',[59 119 179 239 299 359 419 479 539 599 659 719 779 839 899 959 1019 ...
1079 1139 1199 1259 1319 1379 1439 1498 1558 1618 1678 1738 1798 1858 1918 1978 2038 ...
2098 2158 2218 2278 2338 2398 2458 2518 2578 2638 2698 2758 2818 2878 ...
2937 2997 3057 3117 3177 3237 3297 3357 3417 3477 3537 3597 3657 3717 3777 ...
3837 3897 3957 4017 4077 4137 4197 4257 4317])
set(gca,'XTickLabel',{'00','01','02','03','04','05','06','07','08', ...
'09','10','11','12','13','14','15','16','17','18','19','20', ...
'21','22','23','00','01','02','03','04','05','06','07','08', ...
'09','10','11','12','13','14','15','16','17','18','19','20', ...
'21','22','23','00','01','02','03','04','05','06','07','08', ...
'09','10','11','12','13','14','15','16','17','18','19','20', ...
'21','22','23'})
set(gca,'FontSize',8)
xlabel('时间(h)')
ylabel('平均风速(m/s)')
h=legend('风速分钟变率');
set(h,'FontSize',10)
figure
contourf(X,Y,Z) %等高线图
axis([0 4317 0 18])
set(gca,'XTick',[59 119 179 239 299 359 419 479 539 599 659 719 779 839 899 959 1019 ...
1079 1139 1199 1259 1319 1379 1439 1498 1558 1618 1678 1738 1798 1858 1918 1978 2038 ...
2098 2158 2218 2278 2338 2398 2458 2518 2578 2638 2698 2758 2818 2878 ...
2937 2997 3057 3117 3177 3237 3297 3357 3417 3477 3537 3597 3657 3717 3777 ...
3837 3897 3957 4017 4077 4137 4197 4257 4317])
set(gca,'XTickLabel',{'00','01','02','03','04','05','06','07','08', ...
'09','10','11','12','13','14','15','16','17','18','19','20', ...
'21','22','23','00','01','02','03','04','05','06','07','08', ...
'09','10','11','12','13','14','15','16','17','18','19','20', ...
'21','22','23','00','01','02','03','04','05','06','07','08', ...
'09','10','11','12','13','14','15','16','17','18','19','20', ...
'21','22','23'})
set(gca,'FontSize',8)
xlabel('时间(h)')
ylabel('平均风速(m/s)')
h=legend('风速分钟变率');
set(h,'FontSize',10)
figure
surf(X,Y,Z) %三维曲面
axis([0 4317 0 18])
set(gca,'XTick',[59 119 179 239 299 359 419 479 539 599 659 719 779 839 899 959 1019 ...
1079 1139 1199 1259 1319 1379 1439 1498 1558 1618 1678 1738 1798 1858 1918 1978 2038 ...
2098 2158 2218 2278 2338 2398 2458 2518 2578 2638 2698 2758 2818 2878 ...
2937 2997 3057 3117 3177 3237 3297 3357 3417 3477 3537 3597 3657 3717 3777 ...
3837 3897 3957 4017 4077 4137 4197 4257 4317])
set(gca,'XTickLabel',{'00','01','02','03','04','05','06','07','08', ...
'09','10','11','12','13','14','15','16','17','18','19','20', ...
'21','22','23','00','01','02','03','04','05','06','07','08', ...
'09','10','11','12','13','14','15','16','17','18','19','20', ...
'21','22','23','00','01','02','03','04','05','06','07','08', ...
'09','10','11','12','13','14','15','16','17','18','19','20', ...
'21','22','23'})
set(gca,'FontSize',8)
xlabel('时间(h)')
ylabel('平均风速(m/s)')
h=legend('风速分钟变率');
set(h,'FontSize',10)
出现提示:
??? Error using ==> transpose
Out of memory. Type HELP MEMORY for your options.
Error in ==> griddata>gdatav4 at 263
d = abs(d - d.');
Error in ==> griddata at 129
zi = gdatav4(x,y,z,xi,yi);
Error in ==> b at 28
[X,Y,Z]=griddata(x,y,z,linspace(1,4317)',linspace(1.47,16.19),'v4');%插值
一开始画图都可以出来 4张,我改了下legend后忽然就不行了,大家看看咋会事。
|
|