X=[1,3,5,10,30,50,80,150,300,500,800,1500];
Y=[0.551,0.548,0.543,0.53,0.508,0.498,0.489,0.471,0.45,0.43,0.411,0.375];
N=length(X);
Y_new=1/(log(exp(1)+(X./a(1)).^a(2))).^a(3);
函数 f=sum((Y-Y_new).^2)/N;
如何利用fminsearch函数对功能函数f进行搜索最小值得到a(1),a(2),a(3),谢谢!

 채택된 답변

facaso
facaso 2022년 11월 19일

0 개 추천

感觉结果不一定准,但是可以这么写
f = @(x)sum((1./(log(exp(1)+(X./x(1)).^x(2))).^x(3)-Y).^2);
[x,fval]=fminsearch(f,[100 0.5 0.5])

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

2022년 11월 19일

답변:

2022년 11월 19일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!