R=xlsread('工程概率4',6,'A1:B20')
x1=R(:,1)';
k1c=R(:,2)';
ms=-log(-log(x1));
A=polyfit(ms,k1c,1);
y=polyval(A,ms);
%%%数据分析,求出s=0分位处的值,并求s=1分位处的值,联合求解斜率
mmiu=0;
u=polyval(A,mmiu);
m1=1;
k=polyval(A,m1)-polyval(A,mmiu);
%%%作图
plot(ms,k1c,'x',ms,y,'b');
grid on;
%%%修改横轴坐标为Gumbel分布
%%%xticks就是你要在哪些值处显示刻度,xticklabels就是指定显示为什么
% axis([-2 -log(-log(0.999)) 0 9]);
xticks([-log(-log(0.001)) -log(-log(0.01)) -log(-log(0.1))...
-log(-log(0.2)) -log(-log(0.3)) -log(-log(0.4))...
-log(-log(0.5)) -log(-log(0.7)) -log(-log(0.8))...
-log(-log(0.9)) -log(-log(0.95)) -log(-log(0.97)) ...
-log(-log(0.98)) -log(-log(0.99)) -log(-log(0.995))...
-log(-log(0.9975)) -log(-log(0.999))]);
xticklabels({'.001','.01','.10',' ','.30',' ','.50','.70','.80','.90','.95','.97','.98','.99','.995','.9975','.999'});
xticks1=xticks;
xticks1y=11.2*ones(1,length(xticks1));
xticklabels1={' ','100','10','5',' ',' ','2',' ','5','10','20',' ','50','100','200','500','1000'};
text(xticks1-0.1,xticks1y,xticklabels1);
grid on;
xlabel('累计概率=m/(N+1)');
ylabel('风速');
%%%求解曲线斜率
u
k
1/k
- 1
- 2
- 3
前往页