string Zt = textBoxZt.Text.Trim();
string [] Zt1 = Zt.Split(',');
double []Z=new double[Zt1.Length];
double []W=new double[Zt1.Length];
double Zsum=0,Zave=0;
for(int i =0;i < Zt1.Length;i++)
{
Z[i] = Convert.ToDouble(Zt1[i]);
Zsum=Zsum+Z[i];
}
Zave=Zsum/Zt1.Length;
Zave=Math.Round(Zave);
for(int i =0;i < Zt1.Length;i++)
{
W[i]=Z[i]-Zave;
W[i]=Math.Round(W[i]);
textBoxWt.Text+="W["+(i+1).ToString()+"]="+W[i].ToString()+",";
}
string Zt = textBoxZt.Text.Trim();
string [] Zt1 = Zt.Split(',');
double []Z=new double[Zt1.Length];
double []W=new double[Zt1.Length];
double []r=new double[Zt1.Length];
double Zsum=0,Zave=0;
for(int i =0;i < Zt1.Length;i++)
{
Z[i] = Convert.ToDouble(Zt1[i]);
Zsum=Zsum+Z[i];
}
Zave=Zsum/Zt1.Length;
Zave=Math.Round(Zave);
for(int i =0;i < Zt1.Length;i++)
{
W[i]=Z[i]-Zave;
W[i]=Math.Round(W[i]);
}
for(int k =0; k < 16;k++)
{
for(int j=0;j {
r[k]=r[k]+W[j]*W[j+k];
}
r[k]=r[k]/Zt1.Length;
r[k]=Math.Round(r[k]);
textBoxRk.Text+="r["+k.ToString()+"]="+r[k].ToString()+",";
}
textBoxPk.Text="";
string Zt = textBoxZt.Text.Trim();
string [] Zt1 = Zt.Split(',');
double []Z=new double[Zt1.Length];
double []W=new double[Zt1.Length];
double []r=new double[Zt1.Length];
double []p=new double[Zt1.Length];
double Zsum=0,Zave=0;
for(int i =0;i < Zt1.Length;i++)
{
Z[i] = Convert.ToDouble(Zt1[i]);
Zsum=Zsum+Z[i];
}
Zave=Zsum/Zt1.Length;
Zave=Math.Round(Zave);
for(int i =0;i < Zt1.Length;i++)
{
W[i]=Z[i]-Zave;
}
for(int k =0; k < 16;k++)
{
for(int j=0;j {
r[k]=r[k]+W[j]*W[j+k];
}
r[k]=r[k]/Zt1.Length;
r[k]=Math.Round(r[k]);
}
for(int k =1; k < 16;k++)
{
p[k]=Convert.ToDouble(r[k]/r[0]);
p[k]=Math.Round(p[k],2);
textBoxPk.Text+="p["+k.ToString()+"]="+p[k].ToString()+",";
}
textBoxQkk.Text="";
string Zt = textBoxZt.Text.Trim();
string [] Zt1 = Zt.Split(',');
double []Z=new double[Zt1.Length];
double []W=new double[Zt1.Length];
double []r=new double[Zt1.Length];
double []p=new double[Zt1.Length];
double [,]Q=new double[Zt1.Length,Zt1.Length];
double Zsum=0,Zave=0;
for(int i =0;i < Zt1.Length;i++)
{
Z[i] = Convert.ToDouble(Zt1[i]);
Zsum=Zsum+Z[i];
}
Zave=Zsum/Zt1.Length;
Zave=Math.Round(Zave);
for(int i =0;i < Zt1.Length;i++)
{
W[i]=Z[i]-Zave;
W[i]=Math.Round(W[i]);
}
for(int k =0; k < 16;k++)
{
for(int j=0;j {
r[k]=r[k]+W[j]*W[j+k];
}
r[k]=r[k]/Zt1.Length;
r[k]=Math.Round(r[k]);
}
for(int k =1; k < 16;k++)
{
p[k]=Convert.ToDouble(r[k]/r[0]);
p[k]=Math.Round(p[k],2);
}
Q[1,1]=p[1];
for(int k=1;k<16;k++)
{
double s=0,t=0;
for(int j=1;j {
s=s+p[k+1-j]*Q[k,j];
}
for(int j=1;j {
t=t+p[j]*Q[k,j];
}
Q[k+1,k+1]=Convert.ToDouble((p[k+1]-s)/(1-t));
for(int j=1;j {
Q[k+1,j]=Q[k,j]-Q[k+1,k+1]*Q[k,k-j+1];
Q[k,j]=Math.Round(Q[k,j],2);
textBoxQkk.Text+="Q["+k.ToString()+","+j.ToString()+"]="+Q[k,j].ToString()+",";
}
textBoxMX.Text="";
textBoxYB.Text="";
textBoxWC.Text="";
string Zt = textBoxZt.Text.Trim();
string [] Zt1 = Zt.Split(',');
int n=Zt1.Length;
double []Z=new double[Zt1.Length];
double []W=new double[Zt1.Length];
double []r=new double[Zt1.Length];
double []p=new double[Zt1.Length];
double [,]Q=new double[Zt1.Length,Zt1.Length];
double Zsum=0,Zave=0;
for(int i =0;i < Zt1.Length;i++)
{
Z[i] = Convert.ToDouble(Zt1[i]);
Zsum=Zsum+Z[i];
}
Zave=Zsum/Zt1.Length;
Zave=Math.Round(Zave);
for(int i =0;i < Zt1.Length;i++)
{
W[i]=Z[i]-Zave;
W[i]=Math.Round(W[i]);
}
for(int k =0; k < 16;k++)
{
for(int j=0;j {
r[k]=r[k]+W[j]*W[j+k];
}
r[k]=r[k]/Zt1.Length;
r[k]=Math.Round(r[k]);
}
for(int k =1; k < 16;k++)
{
p[k]=Convert.ToDouble(r[k]/r[0]);
p[k]=Math.Round(p[k],2);
}
Q[1,1]=p[1];
for(int k=1;k<16;k++)
{
double s=0,t=0;
for(int j=1;j {
s=s+p[k+1-j]*Q[k,j];
}
for(int j=1;j {
t=t+p[j]*Q[k,j];
}
Q[k+1,k+1]=Convert.ToDouble((p[k+1]-s)/(1-t));
for(int j=1;j {
Q[k+1,j]=Q[k,j]-Q[k+1,k+1]*Q[k,k-j+1];
Q[k,j]=Math.Round(Q[k,j],2);
}
}
double Q1=p[1],d2=Convert.ToDouble(r[0]*(1-p[1]*p[1]));
d2=Math.Round(d2);
string Zt = textBoxZt.Text.Trim();
string [] Zt1 = Zt.Split(',');
int n=Zt1.Length;
double []Z=new double[Zt1.Length];
double []W=new double[Zt1.Length];
double []r=new double[Zt1.Length];
double []p=new double[Zt1.Length];
double [,]Q=new double[Zt1.Length,Zt1.Length];
double Zsum=0,Zave=0;
for(int i =0;i < Zt1.Length;i++)
{
Z[i] = Convert.ToDouble(Zt1[i]);
Zsum=Zsum+Z[i];
}
Zave=Zsum/Zt1.Length;
Zave=Math.Round(Zave);
for(int i =0;i < Zt1.Length;i++)
{
W[i]=Z[i]-Zave;
W[i]=Math.Round(W[i]);
}
for(int k =0; k < 16;k++)
{
for(int j=0;j {
r[k]=r[k]+W[j]*W[j+k];
}
r[k]=r[k]/Zt1.Length;
r[k]=Math.Round(r[k]);
}
for(int k =1; k < 16;k++)
{
p[k]=Convert.ToDouble(r[k]/r[0]);
p[k]=Math.Round(p[k],2);
}
Q[1,1]=p[1];
for(int k=1;k<16;k++)
{
double s=0,t=0;
for(int j=1;j {
s=s+p[k+1-j]*Q[k,j];
}
for(int j=1;j {
t=t+p[j]*Q[k,j];
}
Q[k+1,k+1]=Convert.ToDouble((p[k+1]-s)/(1-t));
for(int j=1;j {
Q[k+1,j]=Q[k,j]-Q[k+1,k+1]*Q[k,k-j+1];
Q[k,j]=Math.Round(Q[k,j],2);
}
}
double Q1=p[1]*(1-p[2])/(1-p[1]*p[1]),Q2=(p[2]-p[1]*p[1])/(1-p[1]*p[1]);
Q1=Math.Round(Q1,3);
Q2=Math.Round(Q2,3);
double d2=Convert.ToDouble(r[0]*(1-Q1*p[1]-Q2*p[2]));
d2=Math.Round(d2);
string Zt = textBoxZt.Text.Trim();
string [] Zt1 = Zt.Split(',');
int n=Zt1.Length;
double []Z=new double[Zt1.Length];
double []W=new double[Zt1.Length];
double []r=new double[Zt1.Length];
double []p=new double[Zt1.Length];
double [,]Q=new double[Zt1.Length,Zt1.Length];
double Zsum=0,Zave=0;
for(int i =0;i < Zt1.Length;i++)
{
Z[i] = Convert.ToDouble(Zt1[i]);
Zsum=Zsum+Z[i];
}
Zave=Zsum/Zt1.Length;
Zave=Math.Round(Zave);
for(int i =0;i < Zt1.Length;i++)
{
W[i]=Z[i]-Zave;
W[i]=Math.Round(W[i]);
}
for(int k =0; k < 16;k++)
{
for(int j=0;j {
r[k]=r[k]+W[j]*W[j+k];
}
r[k]=r[k]/Zt1.Length;
r[k]=Math.Round(r[k]);
}
for(int k =1; k < 16;k++)
{
p[k]=Convert.ToDouble(r[k]/r[0]);
p[k]=Math.Round(p[k],2);
}
Q[1,1]=p[1];
for(int k=1;k<16;k++)
{
double s=0,t=0;
for(int j=1;j {
s=s+p[k+1-j]*Q[k,j];
}
for(int j=1;j {
t=t+p[j]*Q[k,j];
}
Q[k+1,k+1]=Convert.ToDouble((p[k+1]-s)/(1-t));
for(int j=1;j {
Q[k+1,j]=Q[k,j]-Q[k+1,k+1]*Q[k,k-j+1];
Q[k,j]=Math.Round(Q[k,j],2);
}
}
double o1=Math.Round(-2*p[1]/(1+Math.Sqrt(1-4*p[1]*p[1])),3);
double d2=Math.Round(r[0]*(1+Math.Sqrt(1-4*p[1]*p[1]))/2,3);
double []a=new double[n];
for(int k=1;k {
a[k]=Z[k]-Zave+o1*a[k-1];
}
string Zt = textBoxZt.Text.Trim();
string [] Zt1 = Zt.Split(',');
int n=Zt1.Length;
double []Z=new double[Zt1.Length];
double []W=new double[Zt1.Length];
double []r=new double[Zt1.Length];
double []p=new double[Zt1.Length];
double [,]Q=new double[Zt1.Length,Zt1.Length];
double Zsum=0,Zave=0;
for(int i =0;i < Zt1.Length;i++)
{
Z[i] = Convert.ToDouble(Zt1[i]);
Zsum=Zsum+Z[i];
}
Zave=Zsum/Zt1.Length;
Zave=Math.Round(Zave);
for(int i =0;i < Zt1.Length;i++)
{
W[i]=Z[i]-Zave;
W[i]=Math.Round(W[i]);
}
for(int k =0; k < 16;k++)
{
for(int j=0;j {
r[k]=r[k]+W[j]*W[j+k];
}
r[k]=r[k]/Zt1.Length;
r[k]=Math.Round(r[k]);
}
for(int k =1; k < 16;k++)
{
p[k]=Convert.ToDouble(r[k]/r[0]);
p[k]=Math.Round(p[k],2);
}
Q[1,1]=p[1];
for(int k=1;k<16;k++)
{
double s=0,t=0;
for(int j=1;j {
s=s+p[k+1-j]*Q[k,j];
}
for(int j=1;j {
t=t+p[j]*Q[k,j];
}
Q[k+1,k+1]=Convert.ToDouble((p[k+1]-s)/(1-t));
for(int j=1;j {
Q[k+1,j]=Q[k,j]-Q[k+1,k+1]*Q[k,k-j+1];
Q[k,j]=Math.Round(Q[k,j],2);
}
}
double Q1=p[2]/p[1];Q1=Math.Round(Q1,2);
r[0]=r[0]*(1+Q1*Q1-2*Q1*p[1]);r[0]=Math.Round(r[0],2);
r[1]=r[0]*(1+Q1*Q1)*p[1]-Q1-Q1*p[2];r[1]=Math.Round(r[1],2);
p[1]=r[1]/r[0];p[1]=Math.Round(p[1],3);
double o1=Math.Round(-2*p[1]/(1+Math.Sqrt(1-4*p[1]*p[1])),2);
double d2=Math.Round(r[0]*(1+Math.Sqrt(1-4*p[1]*p[1]))/2,3);
double []a=new double[n];
for(int k=1;k {
a[k]=Z[k]-Zave+o1*a[k-1];
}