|
- Rows:=Rows*1.0/1000.0
- Columns:=Columns*1.0/1000.0
- x1:=0.00000000000
- x2:=0.00000000000
- x3:=0.00000000000
- x4:=0.00000000000
- y1:=0.00000000000
- x1y1:=0
- x2y1:=0
- for i := 0 to |Rows|-1 by 1
- x1:=x1+Rows[i]
- x2:=x2+Rows[i]*Rows[i]
- x3:=x3+Rows[i]*Rows[i]*Rows[i]
- x4:=x4+Rows[i]*Rows[i]*Rows[i]*Rows[i]
- y1:=y1+Columns[i]
- x1y1:=x1y1+Rows[i]*Columns[i]
- x2y1:=x2y1+Rows[i]*Rows[i]*Columns[i]
- endfor
- create_matrix(3, 3, 0, MatrixID)
- set_value_matrix(MatrixID,0,0,|Rows|)
- set_value_matrix(MatrixID,0,1,x1)
- set_value_matrix(MatrixID,0,2,x2)
- set_value_matrix(MatrixID,1,0,x1)
- set_value_matrix(MatrixID,1,1,x2)
- set_value_matrix(MatrixID,1,2,x3)
- set_value_matrix(MatrixID,2,0,x2)
- set_value_matrix(MatrixID,2,1,x3)
- set_value_matrix(MatrixID,2,2,x4)
- create_matrix(3,1,0, MatrixID1)
- set_value_matrix(MatrixID1,0,0,y1)
- set_value_matrix(MatrixID1,1,0,x1y1)
- set_value_matrix(MatrixID1,2,0,x2y1)
- invert_matrix(MatrixID,'general', 0, MatrixInvID)
- mult_matrix(MatrixInvID,MatrixID1,'AB', MatrixMultID)
- get_value_matrix(MatrixMultID, 0, 0, a0)
- get_value_matrix(MatrixMultID, 1, 0, a1)
- get_value_matrix(MatrixMultID, 2, 0, a2)
- return ()
复制代码
|
|