How to find parameters of the following coefficient based on optimization tool?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi everyone, I have the following input and function, my purpose is to calculate the value of a,m and n which are scalars using curve fitting in matlab. I have:
ew=[0.679 0.613 0.613 0.501 0.497 0.50 0.389 0.386 0.386 0.391 0.390 0.288 0.288 0.288 0.289 0.289]; Hw=[0.757 0.669 0.71 0.577 0.57 0.60 0.50 0.55 0.52 0.50 0.476 0.353 0.388 0.379 0.431 0.371]; k=[0.217 0.217 0.217 0.163 0.163 0.163 0.131 0.131 0.131 0.131 0.131 0.109 0.109 0.109 0.109 0.109];
Hw=[ew*(1+0.36(1-ew))]*C; C=exp[-a*(k^m)*(1-ew)^n];
any help would be appreciated.
댓글 수: 1
Alan Weiss
2016년 4월 11일
Please format your question using the {} Code button so that we might read it more easily.
Alan Weiss
MATLAB mathematical toolbox documentation
답변 (2개)
Roger Stafford
2016년 4월 12일
Define the following sum of squares of differences:
ew=[0.679 0.613 0.613 0.501 0.497 0.50 0.389 0.386 0.386 0.391 0.390 0.288 0.288 0.288 0.289 0.289];
Hw=[0.757 0.669 0.71 0.577 0.57 0.60 0.50 0.55 0.52 0.50 0.476 0.353 0.388 0.379 0.431 0.371];
k= [0.217 0.217 0.217 0.163 0.163 0.163 0.131 0.131 0.131 0.131 0.131 0.109 0.109 0.109 0.109 0.109];
function s = myfun(a,m,n)
s = sum((Hw-ew.*(1+0.36(1-ew)).*exp[-a*(k.^m).*(1-ew).^n)).^2);
return
and then use that subfunction for optimization of a, m, and n using 'fminsearch' or 'fminunc'. Their descriptions can be found at:
http://www.mathworks.com/help/matlab/ref/fminsearch.html
http://www.mathworks.com/help/optim/ug/fminunc.html
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!