資源簡(jiǎn)介
function a_b_c = wbl3fit(x)
% f(x) = b*a^(-b)*(x-c)^(b-1)*exp(-((x-c)/a)^b)
% a ------ 尺度參數(shù)
% b ------ 形狀參數(shù)
% c ------ 位置參數(shù)
代碼片段和文件信息
function??a_b_c?=?wbl3fit(x)
%?f(x)?=?b*a^(-b)*(x-c)^(b-1)*exp(-((x-c)/a)^b)
%?a?------??尺度參數(shù)
%?b?------??形狀參數(shù)
%?c?------??位置參數(shù)
disp(‘樣本區(qū)間及最大值與最小值之比:‘)
x_range?=?[min(x)?max(x)?max(x)/min(x)]
alpha?=?[0.05];?%置信水平
c?=?linspace(0min(x)1000)‘;
Len_c?=?length(c)-1;
for?i?=?1?:?Len_c
????[a_b(i:)pci{i}]?=?wblfit(x-c(i)alpha);
????lnL(i1)?=?-?wbllike([a_b(i:)]x-c(i));
????if?a_b(i2)?<=?1
????????break;
????end
end
c?=?c(1:i);
figure(‘name‘‘wblthree--參數(shù)特征‘)
[max_lnLposition_max]?=?max(lnL);
subplot(311)
plot(clnL‘r‘c(position_max)max_lnL‘rs‘)
title(‘c?-?lnL‘)
text(c(position_max)max_lnLnum2str(max_lnL));
subplot(312)
plot(ca_b(:1)‘b‘c(position_max)a_b(position_max1)‘bs‘)
text(c(position_max)median(a_b(:1))num2str(a_b(positi
評(píng)論
共有 條評(píng)論