| 查看: 2822 | 回复: 0 | ||
[求助]
Failure in initial user-supplied objective function evaluation
|
|
fum.m: function [ f ] = fun( c,x ) %UNTITLED3 Summary of this function goes here % Detailed explanation goes here % f=1-8/9.8696.*exp(-9.8696.*c(1).*x/(c(2).^2)); f=c(1).*exp(-c(2).*x)+c(3).*((exp(c(4).*x))./x)^0.5; end ana.m: clc;clear; data=[0 0 1 27.33333333 2 37.46666667 3 48.5 4 57.6 5 66.53333333 6 74.43333333 8 85.33333333 10 91.1 12 95.5 14 96.53333333 17 97.3 20 97.93333333 24 98.33333333]; xdata=data(:,1); ydata=data(:,2)./100; c0=[1 0 -0.6506 0.1]; c=c0; for i=1:2 c = lsqcurvefit ('fun', c0, xdata, ydata) ; c0 = c; %以计算出的 c为初值进行迭代; end c x=0:0.5:25; y1=c(1).*exp(-c(2).*x)+c(3).*((exp(c(4).*x))./x).^0.5; plot(xdata, ydata,'o',x,y1,'r'); legend ('实验数据 ','拟合曲线'); 报错: Caused by: Failure in initial user-supplied objective function evaluation. LSQCURVEFIT cannot continue. 意思是初始值设置的不合理导致的吗?那么这个初始值应该怎么选呢??谢谢!! |
» 猜你喜欢
售SCI文章,我:8O.5.5.1O.54,科目全,可十急
已经有26人回复
售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急
已经有14人回复
售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急
已经有16人回复
售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急
已经有15人回复
售SCI一区T0P文章,我:8O.55.1.O.54,科目全,可伽急
已经有17人回复
售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急
已经有21人回复
售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急
已经有21人回复
售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急
已经有8人回复
售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急
已经有8人回复
售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急
已经有8人回复
找到一些相关的精华帖子,希望有用哦~
Just find we cannot use SCI commentary function in emuch and some thoughts
已经有4人回复
【Activity】Share your understanding of the moon image in chinese culture.
已经有103人回复
No initial positions read in
已经有25人回复
【Pure water】MSN login failure in China
已经有3人回复
【Discussion】What are the basic social features in Chinese culture?
已经有16人回复
【求助】向服务器提交含特定原子的任务总是失败:Failure in writing file to gateway
已经有20人回复
【已求助成功】如何从radial distribution function得到各层配位数
已经有9人回复
【Pray】May you two always be in love!
已经有30人回复
Laser Processing Phd position in Italy
已经有3人回复
科研从小木虫开始,人人为我,我为人人










回复此楼
点击这里搜索更多相关资源
50