24小时热门版块排行榜    

查看: 1827  |  回复: 19
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

syy2468

金虫 (正式写手)

忠实虫友

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


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

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

» 猜你喜欢

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

飞跃2017
已阅   回复此楼   关注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的回帖
查看全部 20 个回答

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的回帖

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的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 食品专硕 一志愿双一流 328 +3 xiaom99 2026-03-21 4/200 2026-03-24 21:20 by lailaisimei
[考研] 085602 289分求调剂 +5 WWW西西弗斯 2026-03-24 5/250 2026-03-24 18:51 by jhhcooi
[考研] 0805 316求调剂 +4 大雪深藏 2026-03-18 4/200 2026-03-24 17:34 by dick_runner
[考研] 一志愿南航材料专317分求调剂 +5 炸呀炸呀炸薯条 2026-03-23 5/250 2026-03-24 16:52 by 星空星月
[考研] 080500求调剂 +3 zzzzfan 2026-03-24 3/150 2026-03-24 16:38 by barlinike
[考研] 材料专硕331求调剂 +4 鲜当牛 2026-03-24 4/200 2026-03-24 15:58 by JourneyLucky
[考研] 277分求调剂,跨调材料 +3 考研调剂lxh 2026-03-24 3/150 2026-03-24 13:52 by JourneyLucky
[考研] 327求调剂 +5 prayer13 2026-03-23 5/250 2026-03-23 22:11 by 星空星月
[考研] 一志愿东华大学化学070300,求调剂 +7 2117205181 2026-03-21 8/400 2026-03-22 22:55 by chixmc
[考研] 354求调剂 +7 Tyoumou 2026-03-18 10/500 2026-03-22 11:11 by 人来盛
[考研] 0703化学调剂 +4 妮妮ninicgb 2026-03-21 4/200 2026-03-21 18:39 by 学员8dgXkO
[考研] 297求调剂 +3 喜欢还是不甘心 2026-03-20 3/150 2026-03-21 18:33 by 学员8dgXkO
[考研] 336求调剂 +5 rmc8866 2026-03-21 5/250 2026-03-21 17:24 by 学员8dgXkO
[考研] 299求调剂 +5 shxchem 2026-03-20 7/350 2026-03-21 17:09 by ColorlessPI
[考研] 求调剂 +3 白QF 2026-03-21 3/150 2026-03-21 13:12 by zhukairuo
[考研] 一志愿华中科技大学,080502,354分求调剂 +5 守候夕阳CF 2026-03-18 5/250 2026-03-21 01:06 by JourneyLucky
[考研] 321求调剂 +9 何润采123 2026-03-18 11/550 2026-03-20 23:19 by JourneyLucky
[考研] 材料学硕297已过四六级求调剂推荐 +11 adaie 2026-03-19 11/550 2026-03-20 21:30 by laoshidan
[考研] 295复试调剂 +8 简木ChuFront 2026-03-19 8/400 2026-03-20 20:44 by zhukairuo
[考研] 085600材料与化工调剂 324分 +10 llllkkkhh 2026-03-18 12/600 2026-03-19 14:33 by llllkkkhh
信息提示
请填处理意见