|
Обработка в 1С:Предприятие 8.0
1.Найти параметры a,b,c.
уравнения y = a + bx+сx*x
2.Имеются данные
x1,x2,x3...xN
y1,y2,y3...xN
3.Математическая формулировка данных
4.Алгоритм обработки
SELECT
//Нахождение а
//*************************************************************
//*************************************************************
(SUM(X)*SUM(X*X*X)*SUM(X*X*Y)
-SUM(X)*SUM(X*Y)*SUM(X*X*X*X)
+SUM(X*X)*SUM(X*X*X)*SUM(X*Y)
-SUM(X*X)*SUM(X*X)*SUM(X*X*Y)
-SUM(y)*SUM(X*X*X)*SUM(X*X*X)
+SUM(Y)*SUM(X*X*X*X)*SUM(X*X) )
/ //разделить на
//
( 2*SUM(X*X)*SUM(X)*SUM(X*X*X)
-SUM(X*X)* SUM(X*X)* SUM(X*X)
-COUNT(X)*SUM(X*X*X)*SUM(X*X*X)
-SUM(X*X*X*X)*SUM(X)*SUM(X)
+SUM(X*X*X*X)*Count(X)*SUM(X*X))
//*************************************************************
//*************************************************************
//Нахождение b
,
( -Count(X)*SUM(X*X*X)*SUM(X*X*Y)
+ Count(X)*SUM(X*Y)*SUM(X*X*X*X)
-SUM(X*X)* SUM(X*X)*SUM(X*Y)
+SUM(X*X)*SUM(X)*SUM(X*X*Y)
+SUM(X*X)*SUM(X*X*X)*SUM(Y)
-SUM(X)*SUM(Y)*SUM(X*X*X*X))
/ //разделить на
//
( 2*SUM(X*X)*SUM(X)*SUM(X*X*X)
-SUM(X*X)* SUM(X*X)* SUM(X*X)
-COUNT(X)*SUM(X*X*X)*SUM(X*X*X)
-SUM(X*X*X*X)*SUM(X)*SUM(X)
+SUM(X*X*X*X)*Count(X)*SUM(X*X))
, //Нахождение c
( SUM(X*X)*SUM(X)*SUM(X*Y)
-SUM(X*X)*SUM(X*X)*SUM(Y)
+SUM(X*X*X)*SUM(X)*SUM(Y)
-COUNT(X)*SUM(X*X*X)*SUM(X*Y)
-SUM(X*X*Y)*SUM(X)*SUM(X)
+SUM(X*X*Y)*COUNT(X)*SUM(X*X))
//
/ //разделить на
//
( 2*SUM(X*X)*SUM(X)*SUM(X*X*X)
-SUM(X*X)* SUM(X*X)* SUM(X*X)
-COUNT(X)*SUM(X*X*X)*SUM(X*X*X)
-SUM(X*X*X*X)*SUM(X)*SUM(X)
+SUM(X*X*X*X)*Count(X)*SUM(X*X))
FROM Справочник.Summa
|