Home » Source Code » » ENDLESS.PAS

## ENDLESS.PAS ( File view )

From：
• By 2010-07-31
• View(s)：5
• Point(s)： 1
```			const
datanum =20;           {

}
paranum =2;            {

}
type
a1=array[0..datanum] of real;
a2=array[0..datanum,0..paranum] of real;
a3=array[0..paranum,0..datanum] of real;
a4=array[0..paranum,0..paranum+1] of real;
a5=array[0..paranum] of real;
a7=array[0..paranum+1] of real;
a6=array[0..paranum] of integer;
var
y : a1;                {
y为数组
}
q : a2;                {
q为测量矩阵
}
p : a3;                {
p为q的转置
}
h : a4;                {
h为q.T*q
}
b,X : a5;              {
b为q.T*y；x为待求AR模型参数
}
w : a6;
xx :  a7;
filename1,filename2,filename3 ,filename4: text;
aic,aico : real;

Procedure Ein(var m : a1;var q : a2);           {

}
var i,j,k : integer;
begin
assign(filename1,'f:\shiyan\data.txt');
reset(filename1);
for i:=1 to datanum do
begin
writeln(y[i]);
end;
writeln('display q:');
for j:=1 to datanum-paranum do
begin
for k:=1 to paranum do
begin
q[j,k]:=y[j+paranum-k];
write(q[j,k]:12:5);
end;
writeln;
end;
writeln('display q.t: ' );
end;

Procedure  change(var q : a2);                    {

}
var i,j,k : integer;
begin
for k:=1 to paranum do
begin
for i:=1 to datanum-paranum do
begin
p[k,i]:=q[i,k];
write(p[k,i]:10:5,'      ');
end;
writeln;
end;
writeln('display  q.T*q:  ');
end;

procedure mutipl1;                               {

}
var m,n,l : integer;
begin
for m:=1 to paranum do
begin
for n:=1 to paranum do
begin
h[m,n]:=0;
for l:=1 to datanum-paranum do
h[m,n]:=h[m,n]+p[m,l]*q[l,n];
write(h[m,n]:10:5,'      ');
end;
writeln;
end;
writeln('display q.T*y:');
end;

procedure mutipl2;                          {

}
var i,j : integer;
begin
for i:=1 to paranum do
begin
b[i]:=0;
for j:=1 to datanum-paranum do
b[i]:=b[i]+p[i,j]*y[j+paranum];
writeln(b[i]:10:5);
end;
writeln('X:');
end;

procedure gause;                              {

}
var i,j,k,l,n : integer;
r,e : real;
begin
for i:=1 to paranum do h[i,paranum+1]:=b[i]; {

}
for i:=1 to paranum do  {

}
begin
l:=i;   n:=0;  e:=h[i,0];  {
p,q,e赋值
}
for j:=i to paranum do    {

}
for k:=0 to paranum do{
k循环
}
if abs(h[j,k])>abs(e) then
begin e:=h[j,k];
n:=k;
l:=j;
end; {

}
if abs(e)>1.0E-10 then{
if1
}{

}{

}
begin
if l<>i then {

}{

}
begin
for k:=1 to paranum+1 do begin xx[k]:=H[i,k];H[i,k]:=H[l,k];H[l,k]:=xx[k];end; {

}
end; {
if2
}
for j:=1 to paranum do   {
j循环
}
begin if (j<>i) and (H[j,n]<>0
...
...
```
...
Expand＞ ＜Close

Point(s): 1

0 lines left, continue to read

## File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
ENDLESS.PAS4.55 kB27-03-05|22:16
...
• Sent successfully!
• 1 point

### ENDLESS.PAS (1.94 kB)

Need 1 point

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

Don't have an account？ Register now
Need any help?
Mail to: support@codeforge.com

### 切换到中文版？

CodeForge Chinese Version
CodeForge English Version

### ^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!

### Warm tip!

Favorite by Ctrl+D