²é¿´: 2204  |  »Ø¸´: 4

ÁõСáÔ321

Òø³æ (ÖøÃûдÊÖ)

[ÇóÖú] matlab³öÏÖÎÊÌâ ÒÑÓÐ2È˲ÎÓë

1 function deconvolution
2 data=load('0.10-645.dat');
3 xdata=data(:,1);
4 ydata=data(:,2);
5 x0=[0.1];
6 %x(1)ΪÂö¿í£¬x(2)Ϊʱ¼äÁãµã£¬x(3)ΪA1£¬x(4)Ϊt1£¬x(5)ΪA2£¬x(6)Ϊt2
7 %-----------------------------------------------------------
8 options=optimset('TolFun',1e-4,'TolX',1e-4,'MaxIter',1e9,'MaxFunEvals',1e9);
9 [x,resnorm,residual,exitflag,output]=lsqcurvefit(@fun,x0,xdata,ydata,options);
10 disp('the fitted parameter isdelta   mu   A1   tau1   A2   tau2)');disp(x);
11 disp('the resnorm is:');disp(resnorm);
12 disp('the exit flag is:');disp(exitflag);
13 disp(output);
14 %--------------------------------------------------------------------------fit
15 Fp=fun(x,xdata);
16 irf=-1*2*sqrt(log(2))/0.06/sqrt(pi)*exp(-log(2)*(2*(xdata-x(2))/x(1)).^2)/20;
17 subplot(2,1,1); plot(data(:,1),Fp,'b-',xdata,ydata,'ro',xdata,irf,'g');
18 subplot(2,1,2); plot(data(:,1),residual,'g*');
19 %-------------------------------------------------------------------------
20 result=[xdata ydata Fp residual irf];
21 save -ASCII -DOUBLE result.dat result;
22 y=[x resnorm];
23 save -ASCII -DOUBLE parameters.dat y;
24 function F=fun(x,xdata)
25   delta1=x(1)/(sqrt(log(4)));
26    F1=x(3).*exp(delta1^2/x(4)^2/2).*exp(-(xdata-x(2))/x(4)).*(1+erf(((xdata-x(2))/delta1-delta1/x(4))/sqrt(2)));
27    F2=x(5).*(1+erf((xdata-x(7))/sqrt(2)/delta1)-exp(delta1^2/x(6)^2/2).*exp(-(xdata-x(7))/x(6)).*(1+erf(((xdata-x(7))/delta1-delta1/x(6))/sqrt(2))));
28    F=F1+F2;
Ö´ÐÐÃüÁîʱ³öÏÖ£º
´íÎóʹÓà lsqcurvefit (line 181)
LSQCURVEFIT requires the following inputs to be of data type double: 'LB'.

³ö´í Untitled2 (line 9)
[x,resnorm,residual,exitflag,output]=lsqcurvefit(@fun,x0,xdata,ydata,options);
Ó¦¸ÃÈçºÎÐ޸ģ¿
»Ø¸´´ËÂ¥

» ²ÂÄãϲ»¶

» ±¾Ö÷ÌâÏà¹Ø¼ÛÖµÌùÍÆ¼ö£¬¶ÔÄúͬÑùÓаïÖú:

ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

dbb627

ÈÙÓþ°æÖ÷ (ÖøÃûдÊÖ)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
X = lsqcurvefit(FUN,X0,XDATA,YDATA,LB,UB,OPTIONS) minimizes with the
    default parameters replaced by values in the structure OPTIONS, an
    argument created with the OPTIMSET function. See OPTIMSET for details.
    Use the Jacobian option to specify that FUN also returns a second output
    argument J that is the Jacobian matrix at the point X. If FUN returns
    a vector F of m components when X has length n, then J is an m-by-n matrix
    where J(i,j) is the partial derivative of F(i) with respect to x(j).
    (Note that the Jacobian J is the transpose of the gradient of F.)
¸ÄΪ[x,resnorm,residual,exitflag,output]=lsqcurvefit(@fun,x0,xdata,ydata,[],[],options);
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Â¥2016-03-25 14:19:03
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

ÁõСáÔ321

Òø³æ (ÖøÃûдÊÖ)

ÒýÓûØÌû:
2Â¥: Originally posted by dbb627 at 2016-03-25 14:19:03
X = lsqcurvefit(FUN,X0,XDATA,YDATA,LB,UB,OPTIONS) minimizes with the
    default parameters replaced by values in the structure OPTIONS, an
    argument created with the OPTIMSET function. See OPTI ...

»¹ÊDZ¨´í£¬
³ö´í Untitled2 (line 9)
[x,resnorm,residual,exitflag,output]=lsqcurvefit(@fun,x0,xdata,ydata,[],[],options);

Ô­Òò:
    Failure in initial user-supplied objective function evaluation. LSQCURVEFIT cannot continue.

» ±¾Ìû¸½¼þ×ÊÔ´Áбí

  • »¶Ó­¼à¶½ºÍ·´À¡£ºÐ¡Ä¾³æ½öÌṩ½»Á÷ƽ̨£¬²»¶Ô¸ÃÄÚÈݸºÔð¡£
    ±¾ÄÚÈÝÓÉÓû§×ÔÖ÷·¢²¼£¬Èç¹ûÆäÄÚÈÝÉæ¼°µ½ÖªÊ¶²úȨÎÊÌ⣬ÆäÔðÈÎÔÚÓÚÓû§±¾ÈË£¬Èç¶Ô°æÈ¨ÓÐÒìÒ飬ÇëÁªÏµÓÊÏ䣺xiaomuchong@tal.com
  • ¸½¼þ 1 : QQ½ØÍ¼20160325165443.png
  • 2016-03-25 16:55:21, 48.95 K
3Â¥2016-03-25 16:55:43
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

0ôËС?q0

½ð³æ (³õÈëÎÄ̳)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
Ô´Îļþ·¢À´£¬ÎÒÊÔ×ŵ÷ÊÔÒ»ÏÂ
4Â¥2016-03-25 18:29:00
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

ÁõСáÔ321

Òø³æ (ÖøÃûдÊÖ)

ÒýÓûØÌû:
4Â¥: Originally posted by 0ôËС?q0 at 2016-03-25 18:29:00
Ô´Îļþ·¢À´£¬ÎÒÊÔ×ŵ÷ÊÔÒ»ÏÂ

ºÃµÄ£¬½ñÌì·¢¸øÄã¿´¿´£¬Ð»Ð»

·¢×ÔСľ³æIOS¿Í»§¶Ë
5Â¥2016-03-28 07:08:06
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ ÁõСáÔ321 µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] 306Çó0703µ÷¼ÁÒ»Ö¾Ô¸»ªÖÐʦ·¶ +9 Ö½Óãly 2026-03-21 10/500 2026-03-24 11:36 by 544594351
[¿¼ÑÐ] Ò»Ö¾Ô¸¼ª´ó»¯Ñ§322Çóµ÷¼Á +4 17501029541 2026-03-23 6/300 2026-03-24 10:21 by ´÷Χ²±µÄСÎÃ×Ó
[¿¼ÑÐ] Ò»Ö¾Ô¸¹ú¿Æ¹ý³ÌËù081700£¬274Çóµ÷¼Á +3 ÈýË®ÑÐ0Ë®Á¢·½ 2026-03-23 3/150 2026-03-23 23:11 by MajorWen
[¿¼ÑÐ] Ò»Ö¾Ô¸ÖÐÄÏ´óѧ»¯Ñ§Ñ§Ë¶0703×Ü·Ö337Çóµ÷¼Á +5 niko- 2026-03-22 5/250 2026-03-23 22:01 by fuyu_
[¿¼ÑÐ] 269Çóµ÷¼Á +4 ÎÒÏë¶ÁÑÐ11 2026-03-23 4/200 2026-03-23 21:25 by pswait
[¿¼ÑÐ] Ò»Ö¾Ô¸ÖØÇì´óѧ085700×ÊÔ´Óë»·¾³£¬×Ü·Ö308Çóµ÷¼Á +7 īīĮ 2026-03-23 8/400 2026-03-23 20:36 by Creta
[¿¼ÑÐ] Çóµ÷¼Á²ÄÁÏѧ˶080500£¬×Ü·Ö289·Ö 5+3 @taotao 2026-03-19 21/1050 2026-03-23 10:17 by ¹Úc¸ç
[¿¼ÑÐ] 317Çóµ÷¼Á +12 Éê×ÓÉêÉê 2026-03-19 18/900 2026-03-22 22:23 by luoyongfeng
[¿¼ÑÐ] ÉúÎïѧ071000 329·ÖÇóµ÷¼Á +5 ÎÒ°®ÉúÎïÉúÎﰮΠ2026-03-17 5/250 2026-03-22 16:42 by tcx007
[¿¼ÑÐ] 298Çóµ÷¼ÁÒ»Ö¾Ô¸211 +3 Éϰ¶6666@ 2026-03-20 3/150 2026-03-22 15:50 by ColorlessPI
[¿¼ÑÐ] 0805 316Çóµ÷¼Á +3 ´óÑ©Éî²Ø 2026-03-18 3/150 2026-03-21 18:55 by ѧԱ8dgXkO
[¿¼ÑÐ] 297Çóµ÷¼Á +3 ϲ»¶»¹ÊDz»¸ÊÐÄ 2026-03-20 3/150 2026-03-21 18:33 by ѧԱ8dgXkO
[¿¼ÑÐ] ÇóÖú +5 ÃÎÀïµÄÎÞÑÔ 2026-03-21 6/300 2026-03-21 17:51 by ѧԱ8dgXkO
[¿¼ÑÐ] 302Çóµ÷¼Á +12 ºôºôºô¡£¡£¡£¡£ 2026-03-17 12/600 2026-03-21 17:29 by ColorlessPI
[¿¼ÑÐ] Ò»Ö¾Ô¸ÖØÇì´óѧ085700×ÊÔ´Óë»·¾³×Ü·Ö308Çóµ÷¼Á +7 īīĮ 2026-03-20 7/350 2026-03-21 16:36 by barlinike
[¿¼ÑÐ] Çóµ÷¼Á +3 .m.. 2026-03-21 4/200 2026-03-21 16:25 by barlinike
[¿¼ÑÐ] 308Çóµ÷¼Á +3 °¢½ã°¢½ã¼Ò°¡ 2026-03-18 3/150 2026-03-20 23:24 by JourneyLucky
[¿¼ÑÐ] ²ÄÁÏÓ뻯¹¤ 322Çóµ÷¼Á +4 È»11 2026-03-19 4/200 2026-03-20 22:12 by luoyongfeng
[¿¼ÑÐ] 085410È˹¤ÖÇÄÜר˶317Çóµ÷¼Á£¨0854¶¼¿ÉÒÔ£© +4 xbxudjdn 2026-03-18 4/200 2026-03-20 09:07 by ²»168
[¿¼ÑÐ] ¿¼ÑÐÇóµ÷¼Á +3 éÙËÌ. 2026-03-17 4/200 2026-03-17 21:43 by ÓÐÖ»ÀêÅ«
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û