文件名称:Rombegrg
介绍说明--下载内容来自于网络,使用问题请自行百度
录入程序代码,并对该实验代码进行调试,检查程序代码中的语法和语义错误。
编写函数f(x)的代码如下:
Romberg算法¨
function z=f(x)
if (x~=0)
z=sin(x)/x
else
z=1
end
备注:在实验代码中,首先输入必要的变量的值如下:
a=0
b=1
tol=1e-8
待查询检查通过,开始输入执行代码
设置格式format short g查看u的值和sin(u)的值:
-Input program code, and debugging code for the experiment to check the program code in the syntax and semantic errors. The preparation of a function f (x) of the code is as follows: Romberg algorithm ¨ function z = f (x) if (x ~ = 0) z = sin (x)/x else z = 1 end Note: In the experimental code, First, enter the necessary value of the variable is as follows: a = 0 b = 1 tol = 1e-8 pending inquiries, checking through, began to enter the implementation of the code format format short g see u, values and sin (u) values:
编写函数f(x)的代码如下:
Romberg算法¨
function z=f(x)
if (x~=0)
z=sin(x)/x
else
z=1
end
备注:在实验代码中,首先输入必要的变量的值如下:
a=0
b=1
tol=1e-8
待查询检查通过,开始输入执行代码
设置格式format short g查看u的值和sin(u)的值:
-Input program code, and debugging code for the experiment to check the program code in the syntax and semantic errors. The preparation of a function f (x) of the code is as follows: Romberg algorithm ¨ function z = f (x) if (x ~ = 0) z = sin (x)/x else z = 1 end Note: In the experimental code, First, enter the necessary value of the variable is as follows: a = 0 b = 1 tol = 1e-8 pending inquiries, checking through, began to enter the implementation of the code format format short g see u, values and sin (u) values:
相关搜索: Romberg matlab
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Rombegrg算法.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.