| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 640 人关注过本帖
标题:[求助]为什么会 这样
只看楼主 加入收藏
wxjwq023
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2007-8-13
收藏
 问题点数:0 回复次数:0 
[求助]为什么会 这样
function y=g(x)
y=x^5-3*x^3-2*x^2+2;

p0=1;
tol=10^-6;
max=100000;
function [k,p,err,p]=fixpt('g',p0,tol,max)
p(1)=p0;
for k=2:max
p(k)=feval(g,p(k-1));
err=abs(p(k)-p(k-1));
relerr=err/(abs(p(k))+eps);
p=p(k);
if (err<tol)| (relerr<tol),break; end
end
if k==max
disp('maximum number of iterations exceeded')
end
p=p';
为什么求不出结果,说什么Strings passed to EVAL cannot contain function declarations.
请问这是怎么回事,希望大家帮助
搜索更多相关主题的帖子: function contain number cannot 
2007-08-13 22:13
快速回复:[求助]为什么会 这样
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018330 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved