思路:将水文频率在海森格纸上对应的位置算出来,通过更改坐标轴标签制作海森频率格纸
先放参考链接:
norminv
如何利用matlab在海森几率格纸上绘制图形
clc
clear
close all
%% 随机生成径流系列,并计算对应频率
q = randi(1000,1000,1);
q = sortrows(q,-1);
for j = 1:length(q)
frequncy(j,1) = j/(length(q)+1);
end
%% 计算海森频率格纸中对应的位置及海森频率纸的标准刻度位置
%样本数据的频率对应的位置
x = frequncy*100;
xx = norminv(x/100,0,1);
% 标准刻度位置
x=[0.01 0.05 0.1 0.5 1 5 10 15 20 30 40 50 60 70 80 85 90 95 99 99.9 99.95 99.99];
x_standard = norminv(x/100,0,1);
%% 绘图
figure(1)
plot(frequncy*100,q,'k')
xlabel('Percentaeg of streamflow is equalled or exceeded (%)')
ylabel('daily streamflow (mm/d)')
save('case1.png')
figure(2)
plot(xx,q,'k')
xlim([min(xx) max(xx)])
set(gca, 'XTick',x_standard, 'XTickLabel', string(x));
xlabel('Percentaeg of streamflow is equalled or exceeded (%)')
ylabel('daily streamflow (mm/d)')
save('case2.png')
原始频率图像:
海森频率图像: