class
pro{
public static void main(String args[]){
double a,beta,h,ks,c1,r1,k1;
double k[]=
new double
[101];
double cx[]=new double[101];
double alpha[]=new double[101];
int nx;
double y;
int t,m,n,n2,n3;
double ep;
double th;
double q;
a=0.33;
beta=0.95;
ks=Math.pow;
h=2*ks/
100;
for (n=1;n<101;n++){
k[n]=n*h;
cx[n]=Math.pow(k[n],a);
}
q=Math.PI/100;
for (m=1;m<101;m++){
y=0;
for (n=-100;n<101;n++){
th=n*q;
nx=n;
if (nx<0)nx=-nx;
y=y+cx[nx]*Math.cos(m*th)*q;
}
alpha[m]=y/Math.PI;
}
y=0;
for (n=-100;n<101;n++){
th=n*q;
nx=n;
if (nx<0)nx=-nx;
y=y+cx[nx]*q;
}
alpha[0]=0.5*y/Math.PI;
for (n=0;n<101;n++){
th=n*q;
System.out.
print(cx[n]);
System.out.print(",");
System.out.println(fou(alpha,th));
}
}
public static double fou(double[] alpha,double th){
double f1;
int m;
f1=alpha[0];
for (m=1;m<101;m++){
f1=f1+alpha[m]*Math.cos(m*th);
}
return f1;
}
}
最終更新:2010年10月23日 01:42