24小时热门版块排行榜    

查看: 1829  |  回复: 19

syy2468

金虫 (正式写手)

忠实虫友

[求助] 高手帮忙拟合一组曲线,解决另加分!


这组曲线符合什么函数呢,过一定点(t0,-A),之前我用这个函数:y=-a*(ln(t)-ln(tmax))/(ln(tmin)-ln(tmax)); 拟合出来曲线弧度不够,有点直。t是每条曲线下降的时间段,这里tmin就是起点t0,tmax就是每条曲线到达0的时间点。

请高手帮忙解决,会提示思路,感激不尽啊!另加分!
回复此楼

» 猜你喜欢

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

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

dbb627

荣誉版主 (著名写手)

你最好把数据给出来,符合这种形状的方程式有很多,不拿数据试一下怎么知道哪个合适
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楼2011-10-28 11:39:02
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

syy2468

金虫 (正式写手)

忠实虫友

引用回帖:
2楼: Originally posted by dbb627 at 2011-10-28 11:39:02:
你最好把数据给出来,符合这种形状的方程式有很多,不拿数据试一下怎么知道哪个合适

数据已上传
飞跃2017
3楼2011-10-28 14:05:08
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

★ ★ ★
cenwanglai(金币+3): 幸苦了。这个忙帮起来很快吗? 2011-10-31 11:08:33
使用f(x) = a*exp(b*x) + c*exp(d*x)这个模型基本可以达到要求
初始值的不同,可能会有差异
CODE:
function [cf,good]=datafit(data)
A=data(47:135,:);
yy=A(:,2:51);
y=[];
n=5;
cf=cell(1,n);
good=cell(1,n);
for i=1:n
     y=yy(:,i);
     y=y(y~=0);
     t=[1:length(y)]';
        
k0 =[-10+20*rand -1+2*rand -10+20*rand(1) -1+2*rand];
f=@(p,x)(p(1)*exp(p(2)*x(:,1)) + p(3)*exp(p(4)*x(:,1))-x(:,2)).^2;
[st,re]=lsqnonlin(f,k0,[],[],[],[t y])
  [cf{1,i},good{1,i}]=expfit(t,y,st)
end
     

function [cf_,good]=expfit(t,y,st)
%exp2: f(x) = a*exp(b*x) + c*exp(d*x)
ft_ = fittype('exp2');
[cf_,good]= fit(t,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(t,y,'*')
ylim([-12,0])
xlim([0 90])



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.
4楼2011-10-28 16:12:13
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

syy2468(金币+4): 这个题目解起来很繁,先奖励一下 2011-10-31 11:13:39
fit 1
General model Exp2:
     f(x) = a*exp(b*x) + c*exp(d*x)
Coefficients (with 95% confidence bounds):
       a =  1.474e-014  (-8.61e-014, 1.156e-013)
       b =      0.3711  (0.2937, 0.4486)
       c =      -12.03  (-12.15, -11.91)
       d =     -0.0116  (-0.01188, -0.01132)

Goodness of fit:
  SSE: 3.872
  R-square: 0.9925
  Adjusted R-square: 0.9923
  RMSE: 0.2134
fit 2
General model Exp2:
     f(x) = a*exp(b*x) + c*exp(d*x)
Coefficients (with 95% confidence bounds):
       a =       1.429  (0.8846, 1.974)
       b =    0.003835  (0.0009759, 0.006695)
       c =       -13.6  (-14.13, -13.07)
       d =    -0.01922  (-0.02002, -0.01843)

Goodness of fit:
  SSE: 0.05904
  R-square: 0.9999
  Adjusted R-square: 0.9999
  RMSE: 0.02636
....
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.
5楼2011-10-28 16:14:30
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

syy2468

金虫 (正式写手)

忠实虫友

引用回帖:
5楼: Originally posted by dbb627 at 2011-10-28 16:14:30:
fit 1
General model Exp2:
     f(x) = a*exp(b*x) + c*exp(d*x)
Coefficients (with 95% confidence bounds):
       a =  1.474e-014  (-8.61e-014, 1.156e-013)
       b =      0.3711  (0.2937, 0.448 ...

x指的什么
飞跃2017
6楼2011-10-31 10:36:40
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

x应该就是自变量 或者说是时间t
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-10-31 10:38:45
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

syy2468

金虫 (正式写手)

忠实虫友

引用回帖:
7楼: Originally posted by dbb627 at 2011-10-31 10:38:45:
x应该就是自变量 或者说是时间t

每条曲线的曲率怎么区别的
飞跃2017
8楼2011-10-31 10:48:18
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

曲率,这个要另外算的吧

曲率半径就是曲率的倒数。曲率计算公式如下
函数形式:曲率k=y''/[(1+(y')^2)^(3/2)],其中y', y"分别为函数y对x的一阶和二阶导数;
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-10-31 10:54:20
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

syy2468

金虫 (正式写手)

忠实虫友

引用回帖:
9楼: Originally posted by dbb627 at 2011-10-31 10:54:20:
曲率,这个要另外算的吧

曲率半径就是曲率的倒数。曲率计算公式如下
函数形式:曲率k=y''/[(1+(y')^2)^(3/2)],其中y', y"分别为函数y对x的一阶和二阶导数;

我指的是如何区别两条曲线,你给出的拟合方程只是时间的函数,那如何区别两条曲线呢
飞跃2017
10楼2011-10-31 10:56:18
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 syy2468 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 085601求调剂总分293英一数二 +3 钢铁大炮 2026-03-24 3/150 2026-03-24 22:03 by bingxueer79
[考研] 求调剂323材料与化工 +3 1124361 2026-03-24 3/150 2026-03-24 20:24 by peike
[考研] 274求调剂 +5 顾九笙要谦虚 2026-03-24 5/250 2026-03-24 18:43 by jhhcooi
[考研] 招08考数学 +7 laoshidan 2026-03-20 16/800 2026-03-24 17:52 by 乌拉儿山脉
[考博] 申博26年 +4 八6八68 2026-03-19 4/200 2026-03-24 15:49 by 小Ben呵呵
[考研] 081700 调剂 267分 +9 迷人的哈哈 2026-03-23 9/450 2026-03-24 11:58 by 544594351
[考研] 276求调剂。有半年电池和半年高分子实习经历 +9 材料学257求调剂 2026-03-23 10/500 2026-03-24 07:36 by wangy0907
[考研] 一志愿山东大学药学学硕求调剂 +3 开开心心没烦恼 2026-03-23 4/200 2026-03-24 00:06 by 开开心心没烦恼
[考研] 一志愿国科过程所081700,274求调剂 +3 三水研0水立方 2026-03-23 3/150 2026-03-23 23:11 by MajorWen
[考研] 327求调剂 +5 prayer13 2026-03-23 5/250 2026-03-23 22:11 by 星空星月
[考研] 寻找调剂 +4 倔强芒? 2026-03-21 4/200 2026-03-22 16:14 by 木托莫露露
[考研] 化学调剂 +5 yzysaa 2026-03-21 5/250 2026-03-21 22:12 by peike
[考研] 一志愿南大,0703化学,分数336,求调剂 +3 收到VS 2026-03-21 3/150 2026-03-21 18:42 by 学员8dgXkO
[考研] 0703化学297求调剂 +3 Daisy☆ 2026-03-20 3/150 2026-03-21 17:45 by ColorlessPI
[考研] 299求调剂 +5 shxchem 2026-03-20 7/350 2026-03-21 17:09 by ColorlessPI
[考研] 330求调剂0854 +3 assdll 2026-03-21 3/150 2026-03-21 13:01 by 搏击518
[考研] 一志愿华南师大 070300(化学)304分求调剂 +3 0703武芊慧雪304 2026-03-18 3/150 2026-03-21 00:48 by JourneyLucky
[考研] 321求调剂 +9 何润采123 2026-03-18 11/550 2026-03-20 23:19 by JourneyLucky
[考研] 0817 化学工程 299分求调剂 有科研经历 有二区文章 +22 rare12345 2026-03-18 22/1100 2026-03-20 20:39 by zhukairuo
[考研] 材料学硕318求调剂 +5 February_Feb 2026-03-19 5/250 2026-03-19 23:51 by 23Postgrad
信息提示
请填处理意见