sinlentan
12-11-2008, 06:33 PM
sig=(x[i]-x[i-1])/(x[i+1]-x[i-1]);
p=sig*y2[i-1]+2.0;
y2[i]=(sig-1.0)/p;
u[i]=(y[i+1]-y[i])/(x[i+1]-x[i]) - (y[i]-y[i-1])/(x[i]-x[i-1]);
u[i]=(6.0*u[i]/(x[i+1]-x[i-1])-sig*u[i-1])/p;
p=sig*y2[i-1]+2.0; why is there 2.0 ?
y2[i]=(sig-1.0)/p; How to get this equation ?
May I have some derivation for this algorithm ?
Thanks.
p=sig*y2[i-1]+2.0;
y2[i]=(sig-1.0)/p;
u[i]=(y[i+1]-y[i])/(x[i+1]-x[i]) - (y[i]-y[i-1])/(x[i]-x[i-1]);
u[i]=(6.0*u[i]/(x[i+1]-x[i-1])-sig*u[i-1])/p;
p=sig*y2[i-1]+2.0; why is there 2.0 ?
y2[i]=(sig-1.0)/p; How to get this equation ?
May I have some derivation for this algorithm ?
Thanks.