You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
238 B
13 lines
238 B
function gp=getgp(s,d,n)%通用
|
|
%区间[s,d],复化次数n,获得高斯点的数目=复化次数*2
|
|
a=s;
|
|
h=(d-s)/n;
|
|
b=a+h;
|
|
gp=zeros(n*2,1);
|
|
for i=1:n
|
|
gp(i*2-1)=(a+b)/2+(b-a)/2/(-sqrt(3));
|
|
gp(i*2)=(a+b)/2+(b-a)/2/(sqrt(3));
|
|
a=b;
|
|
b=b+h;
|
|
end
|
|
end
|
|
|