How can I Optimize a multivariable function with Least Square method?
古いコメントを表示
Hi
I have a function to measure chloride content in concrete:
cxt =cs-(cs-ci)*erf((x*0.001)/(sqrt(4*da*t))
where cxt is chloride content.ci is a constant, x is a vector for depth containing 11 values,and t is a constant.
Through testing I have collected some data for cxt. I want to know what values of cs and da minimize the sum of least sqaures so this function can fit my collected lab data.
More info:
this is the code I have written to get cxt for some arbitrary values for cs and da but I dont know how to find the optimal values:

回答 (1 件)
Alan Weiss
2015 年 4 月 20 日
0 投票
There are several MATLAB functions for nonlinear data fitting, such as lsqcurvefit from Optimization Toolbox and nlinfit from Statistics and Machine Learning Toolbox.
Alan Weiss
MATLAB mathematical toolbox documentation
2 件のコメント
Mahmoud
2015 年 4 月 21 日
Alan Weiss
2015 年 4 月 21 日
Alan Weiss
MATLAB mathematical toolbox documentation
カテゴリ
ヘルプ センター および File Exchange で Nonlinear Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!