24小时热门版块排行榜    

查看: 1591  |  回复: 10

anjb99

木虫 (小有名气)

[求助] 非线性拟合-参数求解,matlab,origin!!!!

实验数据:
1.8        1.279
2        1.282
2.4        1.291
2.9        1.331
3.35        1.344
4.3        1.336
5.4        1.339
6.8        1.34
7.5        1.33
8        1.296
8.5        1.221
9.5        1.128
10.5        1.091
11        1.067
11.4        1.065
第一列为溶液pH值,换算为氢离子浓度为([H+]=0.1的pH值次方),第二列为公式中A值,A是[H+]的函数,求参数A1,A2,A3,pKa1和pKa2?非常感谢各位!!!


[ Last edited by dbb627 on 2012-8-1 at 10:39 ]
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

★ ★ ★
感谢参与,应助指数 +1
csgt0: 金币+3, 多谢应助 2012-08-01 13:30:30
A1=p1
A2ka1=p2
A3ka1ka2=p3
ka1=q1
ka1ka2=q2

A=[1.8        1.279
2        1.282
2.4        1.291
2.9        1.331
3.35        1.344
4.3        1.336
5.4        1.339
6.8        1.34
7.5        1.33
8        1.296
8.5        1.221
9.5        1.128
10.5        1.091
11        1.067
11.4        1.065];
x=10.^(-A(:,1));
y=A(:,2);
===========
matlab cftool拟合如下
General model Rat22:
     f(x) = (p1*x^2 + p2*x + p3) / (x^2 + q1*x + q2)
Coefficients (with 95% confidence bounds):
       p1 =  4.247e-014  (fixed at bound)
       p2 =      0.4073  (0.2814, 0.5331)
       p3 =   6.55e-010  (fixed at bound)
       q1 =      0.3049  (0.2092, 0.4007)
       q2 =  6.088e-010  (fixed at bound)

Goodness of fit:
  SSE: 0.002082
  R-square: 0.987
  Adjusted R-square: 0.9859
  RMSE: 0.01266

[ Last edited by dbb627 on 2012-8-1 at 10:40 ]
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
2楼2012-08-01 10:29:54
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)


csgt0: 金币+1, 多谢应助 2012-08-01 13:30:39
拟合结果如图所示,稍作计算可得参数的值


The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
3楼2012-08-01 10:31:22
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

csgt0

荣誉版主 (著名写手)

彩色挂图

【答案】应助回帖

感谢参与,应助指数 +1
可拟合的参数多,比较难找到合适的吧,一般有大概初值比较好
CODE:
function anj
xdata0=[1.8,2,2.4,2.9,3.35,4.3,5.4,6.8,7.5,8,8.5,9.5,10.5,11,11.4];
xdata=0.1.^xdata0;
ydata=[1.279,1.282,1.291,1.331,1.344,1.336,1.339,1.34,1.33,1.296,1.221,1.128,1.091,1.067,1.065];
x0=ones(5,1)+rand(5,1);

opts = optimset('Algorithm','trust-region-reflective');
problem = createOptimProblem('lsqcurvefit','objective',@fun,...
    'x0',x0,'xdata',xdata,'ydata',ydata,'options',opts);
gs = MultiStart;
[x,f] = run(gs,problem,50)
end


function y=fun(x,xdata)
y=(x(1)*xdata.^2+x(2)*x(4)*xdata+x(3)*x(4)*x(5))./(xdata.^2+x(4)*xdata+x(4)*x(5));
end

showmethemoney
4楼2012-08-01 10:48:28
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

anjb99

木虫 (小有名气)

引用回帖:
4楼: Originally posted by csgt0 at 2012-08-01 10:48:28
可拟合的参数多,比较难找到合适的吧,一般有大概初值比较好

function anj
xdata0=;
xdata=0.1.^xdata0;
ydata=;
x0=ones(5,1)+rand(5,1);

opts = optimset('Algorithm','trust-region-reflective');
pr ...

Ka1 大概为2.4
Ka2 大概为9.2
matlab不是太懂
5楼2012-08-01 10:53:48
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

anjb99

木虫 (小有名气)

引用回帖:
3楼: Originally posted by dbb627 at 2012-08-01 10:31:22
拟合结果如图所示,稍作计算可得参数的值
03/21/149791_1343788281_547.jpg

非常感谢!!!
我的Ka1和Ka2 大概为2.4和9.2,这两个值分别为拟合曲线中上坡和下坡中间的点,可以求出那个中间点吗?我发张图您参考一下!


6楼2012-08-01 11:00:51
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
7楼2012-08-01 11:14:38
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ...
anjb99: 金币+100, 有帮助, 数据只采集了这些,可以当其中一个为已知2.4,求出图中的那个拐点吗? 2012-08-01 11:49:12
引用回帖:
6楼: Originally posted by anjb99 at 2012-08-01 11:00:51
非常感谢!!!
我的Ka1和Ka2 大概为2.4和9.2,这两个值分别为拟合曲线中上坡和下坡中间的点,可以求出那个中间点吗?我发张图您参考一下!
8f/2f/720511_1343790049_925.gif
...

你提供的数据只有一个这样的拐点,这个是可以求出那个中间点
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
8楼2012-08-01 11:25:15
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

anjb99

木虫 (小有名气)

引用回帖:
8楼: Originally posted by dbb627 at 2012-08-01 11:25:15
你提供的数据只有一个这样的拐点,这个是可以求出那个中间点...

数据只采集了这些,可以当其中一个为已知2.4,求出图中的那个拐点吗?
9楼2012-08-01 11:49:21
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

anjb99

木虫 (小有名气)

引用回帖:
8楼: Originally posted by dbb627 at 2012-08-01 11:25:15
你提供的数据只有一个这样的拐点,这个是可以求出那个中间点...

数据只采集了这些,可以当其中一个为已知2.4,求出图中的那个拐点吗?
10楼2012-08-01 11:49:36
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 anjb99 的主题更新
信息提示
请填处理意见