Applying the Nonlinear Least Squares Method to Minimize the Objective Function to Find the Parameters of the Equation
7 ビュー (過去 30 日間)
表示 古いコメント
The liquid-liquid equilibrium data were fitted using the NRTL equation. The equation parameters of NRTL are derived from the experimental data.
below is my code:
clc,clear
options=optimset('MaxIter',4000,'MaxFunEvals',2000000,'algorithm','levenberg-marquardt');
b0=[0,0,0,0,0,0];
[b,gamma1,gamma2,gamma3,gamma4,gamma5,gamma6]=lsqnonlin('NRTL',b0,[],[],options);
Although the code gives the result, the result is not what I want. And the format of the output gamma is also wrong. It should be a matrix of the same order as x1, but it has become something I don't understand. Can someone please give a reason? It would be best to give some solutions. Thanks!
0 件のコメント
採用された回答
Matt J
2022 年 7 月 4 日
編集済み: Matt J
2022 年 7 月 4 日
Your code makes strange assumptions about the output syntax of lsqnonlin.
Why do you think lsqnonlin will return values for the gamma variables in NRTL?
6 件のコメント
Matt J
2022 年 7 月 4 日
Do you have any other suggestions?
@yu zhang I suggest you Acccept-click this answer, since your original question appears to have been resolved.
Since you have a new question and since it is related to code different from this question, I suggest you post that in a new thread.
その他の回答 (0 件)
参考
カテゴリ
Find more on Get Started with Curve Fitting Toolbox 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!