洛伦兹曲线参数估计求助,知道x,y求参数b1、b2、b3。
Show older comments
x=[0.1:0.1:0.9,0.95];
y=[0.025, 0.0673,0.1221,0.1882,0.2663,0.3569,0.4631,0.5901,0.7485,0.8493];
plot(x,y,'*'),xlabel('p'),ylabel('L'),title('A地区,年份之一的洛伦兹曲线')
hold on;
b0=[0.2,0.2,0.5]; %b初始值
fun=inline('(1-(1-x)^b(1))/(1-b(2)*log(x))^b(3)','b','x');
%将b看成参考量,b(i)为分量,本意是求:(1-(1-p)^b1)/(1-(1/b2)*log(x))^b3
[b,r,j]=nlinfit(x,y,fun,b0);
b %最佳参数
R=sun(r.^2) %误差平方和
Accepted Answer
More Answers (0)
Categories
Find more on Hypothesis Tests in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!