24小时热门版块排行榜    

Znn3bq.jpeg
查看: 2153  |  回复: 13

zhangxiaodao

银虫 (小有名气)

[求助] 根据数据和方程的形式,求方程中的参数

RT, 数据如下列, 然后方程的形式为y=a*exp[-p/(x+q)],求方程中的p和q,谢谢各位大侠,急求啊~~
x=1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2
2.1
2.2
2.3
2.4
y=10363972.36
5697599.795
3269017.372
1948866.775
1202604.284
765578.5464
501320.0508
336809.4864
231640.3371
162754.7914
116618.904
85080.3473
63109.81473
47535.43773
回复此楼

» 猜你喜欢

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

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

715211229

木虫 (正式写手)

★ ★
臭水沟(金币+2): 谢谢交流~~ 2011-12-20 11:03:15
matlab :ctool工具箱
%%%拟合效果很差

Fit computation did not converge:
Maximum number of function evaluations exceeded. Increasing
MaxFunEvals (in fit options) may allow for a better fit, or
the current equation may not be a good model for the data.

Fit found when optimization terminated:

General model:
       f(x) = a*exp(-p/(x+q))
Coefficients (with 95% confidence bounds):
       a =       11.28  (-2.505e+004, 2.507e+004)
       p =      -7.497  (-3191, 3176)
       q =     -0.4499  (-151.6, 150.7)

Goodness of fit:
  SSE: 1.309e+014
  R-square: -0.159
  Adjusted R-square: -0.3697
  RMSE: 3.45e+006


» 本帖已获得的红花(最新10朵)

我是蜗牛
2楼2011-12-20 05:28:41
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

715211229

木虫 (正式写手)

cftool工具箱
我是蜗牛
3楼2011-12-20 05:29:19
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zhangxiaodao

银虫 (小有名气)

送鲜花一朵
引用回帖:
: Originally posted by 715211229 at 2011-12-20 05:28:41:
matlab :ctool工具箱
%%%拟合效果很差

Fit computation did not converge:
Maximum number of function evaluations exceeded. Increasing
MaxFunEvals (in fit options) may allow  ...

谢谢
4楼2011-12-20 09:00:53
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

715211229

木虫 (正式写手)


臭水沟(金币+1): 谢谢交流~~ 2011-12-20 11:03:26
你看下这个帖子,我这个可能是错误的
http://muchong.com/bbs/viewthread.php?tid=3866180
我是蜗牛
5楼2011-12-20 10:48:24
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖


感谢参与,应助指数 +1
zhangxiaodao(金币+20): 2011-12-20 13:52:42
xiegangmai(金币+1): 谢谢应助! 2011-12-20 23:02:49
General model:
     f(x) = a*exp(-p/(x+q))
Coefficients (with 95% confidence bounds):
       a =           1  (1, 1)
       p =         -42  (-42, -42)
       q =         1.5  (1.5, 1.5)

Goodness of fit:
  SSE: 1.767e-007
  R-square: 1
  Adjusted R-square: 1
  RMSE: 0.0001267

初值a=10000 p=-2  q=-1
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.
6楼2011-12-20 11:22:06
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)


xiegangmai(金币+1): 辛苦了! 2011-12-20 23:03:02
引用回帖:
5楼: Originally posted by 715211229 at 2011-12-20 10:48:24:
你看下这个帖子,我这个可能是错误的
http://muchong.com/bbs/viewthread.php?tid=3866180

图如下





» 本帖已获得的红花(最新10朵)

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.
7楼2011-12-20 11:23:32
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zhangxiaodao

银虫 (小有名气)

送鲜花一朵
引用回帖:
: Originally posted by dbb627 at 2011-12-20 11:23:32:
图如下


非常感谢,您拟合的太棒了~~
ps: 怎么送金币呢?然后能讲程序发给我吗,我是MATLAB门外汉。。。。
8楼2011-12-20 13:48:57
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

CODE:
x=[1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2
2.1
2.2
2.3
2.4];
y=[10363972.36
5697599.795
3269017.372
1948866.775
1202604.284
765578.5464
501320.0508
336809.4864
231640.3371
162754.7914
116618.904
85080.3473
63109.81473
47535.43773];
st_ = [1000 -2 -1];
ft_ = fittype('a*exp(-p/(x+q))','dependent',{'y'},'independent',{'x'},'coefficients',{'a', 'p','q'});
[cf_,good]= fit(x,y,ft_ ,'Startpoint',st_)
h_ = plot(cf_,'fit',0.95);
legend off;  % turn off legend from plot method call
set(h_(1),'Color',[1 0 0],...
     'LineStyle','-', 'LineWidth',2,...
     'Marker','none', 'MarkerSize',6);
hold on,plot(x,y,'*')

cf_ =

     General model:
     cf_(x) = a*exp(-p/(x+q))
     Coefficients (with 95% confidence bounds):
       a =           1  (1, 1)
       p =         -42  (-42, -42)
       q =         1.5  (1.5, 1.5)

good =

           sse: 1.7672e-007
       rsquare: 1
           dfe: 11
    adjrsquare: 1
          rmse: 1.2675e-004

» 本帖已获得的红花(最新10朵)

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.
9楼2011-12-20 14:38:54
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zhangxiaodao

银虫 (小有名气)

送鲜花一朵
引用回帖:
: Originally posted by dbb627 at 2011-12-20 14:38:54:
[code]
x=[1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2
2.1
2.2
2.3
2.4];
y=[10363972.36
5697599.795
3269017.372
1948866.775
1202604.284
765578.5464
501320.0508
336809.4864
231640.3 ...

非常感谢dbb627版主,可能您也知道我问您要源程序的目的了,我手里还有一些数据,是跟上面一样的方程,希望得到a,p,q值,请问能直接套用这个程序吗,或者需要做哪些调整,谢谢您。
10楼2011-12-20 15:41:40
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 zhangxiaodao 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 求调剂,262机械专硕 +5 嗯yyl 2026-04-08 5/250 2026-04-08 23:27 by 6781022
[考研] 机械专硕273请求调剂 +6 庚申壬申 2026-04-07 6/300 2026-04-08 22:41 by bljnqdcc
[考研] 302分求调剂 +4 凡语祈愿 2026-04-08 5/250 2026-04-08 22:03 by 土木硕士招生
[考研] 293分求调剂,外语为俄语 +7 加一一九 2026-04-07 10/500 2026-04-08 20:14 by yutian743
[考研] 化工学硕 285求调剂 +26 Wisjxn 2026-04-07 26/1300 2026-04-08 14:42 by screening
[考研] 材料调剂 +19 一样YWY 2026-04-02 20/1000 2026-04-08 11:02 by 不吃魚的貓
[考研] 0703化学调剂325分 +13 15771691647 2026-04-04 14/700 2026-04-08 10:28 by screening
[考研] 263分B区求调剂 +6 李nihao 2026-04-08 6/300 2026-04-08 09:38 by 南开小綦
[考研] 080100力学316求调剂 +3 L_Hairui 2026-04-07 3/150 2026-04-07 23:26 by JourneyLucky
[考研] 323求调剂 +3 林zlu 2026-04-07 4/200 2026-04-07 23:21 by lbsjt
[考研] 295求调剂 +18 xndjjj 2026-04-04 19/950 2026-04-07 11:02 by wangjy2002
[考研] 319分085702安全工程求调剂 +6 rious 2026-04-05 6/300 2026-04-07 09:42 by jp9609
[考研] 一志愿南航,数一英一学硕317求调剂!! +6 Acaciad 2026-04-04 6/300 2026-04-06 12:13 by 考研学校招点人
[考研] 324求调剂 +3 k可乐 2026-04-05 4/200 2026-04-06 09:54 by 蓝云思雨
[考研] 考研生物学考A区211,初试322,科目生化和生物综合,求调剂 +6 。。。54 2026-04-03 6/300 2026-04-05 14:54 by JOKER0401
[考研] 怎么删帖子啊 +3 缝曦1000 2026-04-04 3/150 2026-04-04 14:20 by 土木硕士招生
[考研] 材料调剂 +11 吴棂颖! 2026-04-03 11/550 2026-04-04 09:56 by 小小树2024
[考研] 289-求调剂 +4 这里是_ 2026-04-03 4/200 2026-04-03 14:23 by 1753564080
[考研] 283求调剂 +3 jiouuu 2026-04-03 4/200 2026-04-03 13:28 by jiouuu
[考研] 303求调剂 +3 一色清羽 2026-04-02 4/200 2026-04-03 10:22 by 蓝云思雨
信息提示
请填处理意见