代码搜索:Romberg
找到约 235 项符合「Romberg」的源代码
代码结果 235
www.eeworm.com/read/411330/7083285
romberg
Romberg求积法2007-07-16 18:41#include
#include
using namespace std;
#define f(x) 1/(x) //注意括号。被积函数
double power(double x,int y)
{
int i;
for(i=1;i
www.eeworm.com/read/338549/12294652
romberg
-56.51953290 -50.80398679 -11.97045990 -0.08279815 -1.33069053 -1.42646878 -1.42603675 -1.42602477 -1.42602476
-52.23287332 -14.39755533 -0.26854286 -1.32581595 -1.42637525 -1.42603685 -1.42602477 -
www.eeworm.com/read/296319/8109927
for romberg.for
www.eeworm.com/read/288118/8651984
c romberg.c
www.eeworm.com/read/387009/8712143
h romberg.h
template
Doub qromb(T &func, Doub a, Doub b, const Doub eps=1.0e-10) {
const Int JMAX=20, JMAXP=JMAX+1, K=5;
VecDoub s(JMAX),h(JMAXP);
Poly_interp polint(h,s,K);
h[0]=1.0;
Trapzd
www.eeworm.com/read/378501/9228476
c romberg.c
#include
#include
#include
float f(float x)
{
return (x*x*x+sin(x))/x;
}
float Romberg(float a,float b,float (*f)(float),float epsilon)
{
int n=1,k;
fl
www.eeworm.com/read/378420/9231524
c romberg.c
www.eeworm.com/read/181714/9240382
m romberg.m
function [I, info, R] = romberg(f,a,b,tol,p)
% Romberg's method for the integral of f over [a,b].
% Assume that T(h) = T(0) + a1*h^p(1) + ... + aq*h^p(q) ,
% where q = length(p) .
% Default:
www.eeworm.com/read/377344/9279657
exe romberg.exe
www.eeworm.com/read/376522/9315758
m romberg.m
function r = romberg(f,a,b,n)
h = b-a;
r(1,1) = h*(feval(f,a)+feval(f,b))/2
for i =2:n
sum = 0;
for k =1:2^(i-2)
sum = sum+feval(f,a+(k-0.5)*h);
end;
r(2,1)=(r(1,1)+h*sum)/2;
for j =