Matlab实现——to find the fixed point
来源:互联网 发布:时时彩平台程序源码 编辑:程序博客网 时间:2024/06/06 19:38
fixpt.m
function [k,p,err,P]=fixpt(g,p0,tol,max1)% Input - g is the iteration function input as a string ??g??% - p0 is the initial guess for the fixed-point% - tol is the tolerance% - max1 is the maximum number of iterations % Output - k is the number of iterations that were carried out% - p is the approximation to the fixed-point% - err is the error in the approximation% - P contains the sequence {pn}P(1)=p0;for k=2:max1 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;endendif k==max1 disp('maximum number of iterations exceeded')endP=P';
程序示例:
fun.m
function g=fun(x)g=x^5-3*x^3-2*x^2+2;Untitled3.mp0=-1.6;tol=10e-12;max1=7;g='fun';[k,p,err,P]=fixpt(g,p0,tol,max1)
运行的结果说明在点(-1.6,-1.8)附近的不动点是排斥不动点
- Matlab实现——to find the fixed point
- How to find the crash point: Android Native crash
- Hoj 2991 Find the Point
- Unable to find a javac compiler;Perhaps JAVA_HOME does not point to the JDK
- Unable to find a javac compiler;Perhaps JAVA_HOME does not point to the JDK解决
- Ant Unable to find a javac compiler Perhaps JAVA_HOME does not point to the JDK 解决办法
- Fixed-Point Designer:Create Fixed-Point Data
- Find closest point on a Linestring to another point
- Unable to find a javac compiler;Perhaps JAVA_HOME does not point to the JDK异常产生原因和解决方法。
- eclipse3.1.2 +tomcat5.0 配置问题:Unable to find a javac compiler ;Perhaps JAVA_HOME does not point to the JDK
- Unable to find a javac compiler;Perhaps JAVA_HOME does not point to the JDK异常产生原因和解决方法
- HTML:Set the table layout to fixed.
- How to get to the point quickly?
- zoj3845 Fixed Point
- Unable to find a version of the runtime to run this application.【matlab】
- Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK(转
- Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK(转
- 问题:Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath.Perhaps JAVA_HOME does not point to the JDK
- Matlab实现——Uppr Triangularization Followed by Back Subtitution
- Matlab实现——Forward-substitution
- 这就是我
- Matlab实现——Newton-Raphson Iteration
- AndEngine Button实现
- Matlab实现——to find the fixed point
- vs2005带命令行参数调试
- 学生信息管理系统—总结
- 智力题——12.相机辨圆盘方向
- Matlab实现——捕食者-被捕食者模型
- 那天在CSDN上看到一个网友在华为遇到的面试题是一道乘法题看似简其实并不是因为它们都超出了数据类型的范围,今天做了下加法希望对大家有所启示
- 内存空间分几部分:代码段、数据段,栈,堆 (收集整理)
- 《天龙八部》地形研究
- 2011励志个性签名