возможно ли запихнуть в LeastSquares это уравнение?
и почему пишет Solve::svars: Equations may not give solutions for all "solve" variables. >>
вроде кол-во уравнений равно кол-ву неизвестных
Код:
CForm[Solve[(m31 x1 + m32 y1 + 1) u1 == (m11 x1 + m12 y1 + m13) &&
(m31 x1 + m32 y1 + 1) v1 == (m21 x1 + m22 y1 + m23) &&
(m31 x2 + m32 y2 + 1) u2 == (m11 x2 + m12 y2 + m13) &&
(m31 x2 + m32 y2 + 1) v2 == (m21 x2 + m22 y2 + m23) &&
(m31 x3 + m32 y3 + 1) u3 == (m11 x3 + m12 y3 + m13) &&
(m31 x3 + m32 y3 + 1) v3 == (m21 x3 + m22 y3 + m23) &&
(m31 x4 + m32 y4 + 1) u4 == (m11 x4 + m12 y4 + m13) &&
(m31 x4 + m32 y4 + 1) v4 == (m21 x4 + m22 y4 + m23) &&
(m31 x5 + m32 y5 + 1) u5 == (m11 x5 + m12 y5 + m13) &&
(m31 x5 + m32 y5 + 1) v5 == (m21 x5 + m22 y5 + m23) &&
(m31 x6 + m32 y6 + 1) u6 == (m11 x6 + m12 y6 + m13) &&
(m31 x6 + m32 y6 + 1) v6 == (m21 x6 + m22 y6 + m23) &&
(m31 x7 + m32 y7 + 1) u7 == (m11 x7 + m12 y7 + m13) &&
(m31 x7 + m32 y7 + 1) v7 == (m21 x7 + m22 y7 + m23) &&
(m31 x8 + m32 y8 + 1) u8 == (m11 x8 + m12 y8 + m13) &&
(m31 x8 + m32 y8 + 1) v8 == (m21 x8 + m22 y8 + m23) &&
(m31 x9 + m32 y9 + 1) u9 == (m11 x9 + m12 y9 + m13) &&
(m31 x9 + m32 y9 + 1) v9 == (m21 x9 + m22 y9 + m23) &&
(m31 x10 + m32 y10 + 1) u10 == (m11 x10 + m12 y10 + m13) &&
(m31 x10 + m32 y10 + 1) v10 == (m21 x10 + m22 y10 + m23) &&
dx == x2 - x1 &&
dy == y2 - y1 &&
dx == x4 - x3 &&
dy == y4 - y3 &&
dx == x6 - x5 &&
dy == y6 - y5 &&
dx == x8 - x7 &&
dy == y8 - y7 &&
dx == x10 - x9 &&
dy == y10 - y9
, {dx, dy, m11, m12, m13, m21, m22, m23, m31, m32,
x1, x2, x3, x4, x5, x6, x7, x8, x9, x10,
y1, y2, y3, y4, y5, y6, y7, y8, y9, y10}]]
Solve::svars: Equations may not give solutions for all "solve" variables. >>
List(List(Rule(dx,-x1 + x2),Rule(dy,(m31*(x1 - x2))/m32),Rule(m11,(m12*m31)/m32),
Rule(m13,m12/m32),Rule(m21,(m22*m31)/m32),Rule(m23,m22/m32),Rule(x4,-x1 + x2 + x3),
Rule(x6,-x1 + x2 + x5),Rule(x8,-x1 + x2 + x7),Rule(x10,-x1 + x2 + x9),
Rule(y1,(-1 - m31*x1)/m32),Rule(y2,(-1 - m31*x2)/m32),Rule(y3,(-1 - m31*x3)/m32),
Rule(y4,(-1 + m31*x1 - m31*x2 - m31*x3)/m32),Rule(y5,(-1 - m31*x5)/m32),
Rule(y6,(-1 + m31*x1 - m31*x2 - m31*x5)/m32),Rule(y7,(-1 - m31*x7)/m32),
Rule(y8,(-1 + m31*x1 - m31*x2 - m31*x7)/m32),Rule(y9,(-1 - m31*x9)/m32),
Rule(y10,(-1 + m31*x1 - m31*x2 - m31*x9)/m32)),
List(Rule(dx,-x1 + x2),Rule(dy,(m31*(x1 - x2))/m32),Rule(m11,0),Rule(m12,0),Rule(m13,0),
Rule(m21,(m22*m31)/m32),Rule(m23,m22/m32),Rule(x4,-x1 + x2 + x3),
Rule(x6,-x1 + x2 + x5),Rule(x8,-x1 + x2 + x7),Rule(x10,-x1 + x2 + x9),
Rule(y1,(-1 - m31*x1)/m32),Rule(y2,(-1 - m31*x2)/m32),Rule(y3,(-1 - m31*x3)/m32),
Rule(y4,(-1 + m31*x1 - m31*x2 - m31*x3)/m32),Rule(y5,(-1 - m31*x5)/m32),
Rule(y6,(-1 + m31*x1 - m31*x2 - m31*x5)/m32),Rule(y7,(-1 - m31*x7)/m32),
Rule(y8,(-1 + m31*x1 - m31*x2 - m31*x7)/m32),Rule(y9,(-1 - m31*x9)/m32),
Rule(y10,(-1 + m31*x1 - m31*x2 - m31*x9)/m32)),
List(Rule(dx,-x1 + x2),Rule(dy,0),Rule(m11,0),Rule(m13,m12/m32),Rule(m21,0),
Rule(m23,m22/m32),Rule(m31,0),Rule(x4,-x1 + x2 + x3),Rule(x6,-x1 + x2 + x5),
Rule(x8,-x1 + x2 + x7),Rule(x10,-x1 + x2 + x9),Rule(y1,-(1/m32)),Rule(y2,-(1/m32)),
Rule(y3,-(1/m32)),Rule(y4,-(1/m32)),Rule(y5,-(1/m32)),Rule(y6,-(1/m32)),
Rule(y7,-(1/m32)),Rule(y8,-(1/m32)),Rule(y9,-(1/m32)),Rule(y10,-(1/m32))),
List(Rule(dx,0),Rule(dy,-y1 + y2),Rule(m12,0),Rule(m13,m11/m31),Rule(m22,0),
Rule(m23,m21/m31),Rule(m32,0),Rule(x1,-(1/m31)),Rule(x2,-(1/m31)),Rule(x3,-(1/m31)),
Rule(x4,-(1/m31)),Rule(x5,-(1/m31)),Rule(x6,-(1/m31)),Rule(x7,-(1/m31)),
Rule(x8,-(1/m31)),Rule(x9,-(1/m31)),Rule(x10,-(1/m31)),Rule(y4,-y1 + y2 + y3),
Rule(y6,-y1 + y2 + y5),Rule(y8,-y1 + y2 + y7),Rule(y10,-y1 + y2 + y9)),
List(Rule(dx,-x1 + x2),Rule(dy,(m31*(x1 - x2))/m32),Rule(m11,0),Rule(m12,0),Rule(m13,0),
Rule(m21,0),Rule(m22,0),Rule(m23,0),Rule(x4,-x1 + x2 + x3),Rule(x6,-x1 + x2 + x5),
Rule(x8,-x1 + x2 + x7),Rule(x10,-x1 + x2 + x9),Rule(y1,(-1 - m31*x1)/m32),
Rule(y2,(-1 - m31*x2)/m32),Rule(y3,(-1 - m31*x3)/m32),
Rule(y4,(-1 + m31*x1 - m31*x2 - m31*x3)/m32),Rule(y5,(-1 - m31*x5)/m32),
Rule(y6,(-1 + m31*x1 - m31*x2 - m31*x5)/m32),Rule(y7,(-1 - m31*x7)/m32),
Rule(y8,(-1 + m31*x1 - m31*x2 - m31*x7)/m32),Rule(y9,(-1 - m31*x9)/m32),
Rule(y10,(-1 + m31*x1 - m31*x2 - m31*x9)/m32)),
List(Rule(dx,-x1 + x2),Rule(dy,0),Rule(m11,0),Rule(m12,0),Rule(m13,0),Rule(m21,0),
Rule(m23,m22/m32),Rule(m31,0),Rule(x4,-x1 + x2 + x3),Rule(x6,-x1 + x2 + x5),
Rule(x8,-x1 + x2 + x7),Rule(x10,-x1 + x2 + x9),Rule(y1,-(1/m32)),Rule(y2,-(1/m32)),
Rule(y3,-(1/m32)),Rule(y4,-(1/m32)),Rule(y5,-(1/m32)),Rule(y6,-(1/m32)),
Rule(y7,-(1/m32)),Rule(y8,-(1/m32)),Rule(y9,-(1/m32)),Rule(y10,-(1/m32))),
List(Rule(dx,0),Rule(dy,-y1 + y2),Rule(m11,0),Rule(m12,0),Rule(m13,0),Rule(m22,0),
Rule(m23,m21/m31),Rule(m32,0),Rule(x1,-(1/m31)),Rule(x2,-(1/m31)),Rule(x3,-(1/m31)),
Rule(x4,-(1/m31)),Rule(x5,-(1/m31)),Rule(x6,-(1/m31)),Rule(x7,-(1/m31)),
Rule(x8,-(1/m31)),Rule(x9,-(1/m31)),Rule(x10,-(1/m31)),Rule(y4,-y1 + y2 + y3),
Rule(y6,-y1 + y2 + y5),Rule(y8,-y1 + y2 + y7),Rule(y10,-y1 + y2 + y9)),
List(Rule(dx,0),Rule(dy,-y1 + y2),Rule(m11,0),Rule(m12,0),Rule(m13,0),Rule(m21,0),
Rule(m22,0),Rule(m23,0),Rule(m32,0),Rule(x1,-(1/m31)),Rule(x2,-(1/m31)),
Rule(x3,-(1/m31)),Rule(x4,-(1/m31)),Rule(x5,-(1/m31)),Rule(x6,-(1/m31)),
Rule(x7,-(1/m31)),Rule(x8,-(1/m31)),Rule(x9,-(1/m31)),Rule(x10,-(1/m31)),
Rule(y4,-y1 + y2 + y3),Rule(y6,-y1 + y2 + y5),Rule(y8,-y1 + y2 + y7),
Rule(y10,-y1 + y2 + y9)),List(Rule(dx,0),Rule(dy,0),
Rule(m13,(m12 + m12*m31*x1 - m11*m32*x1)/m32),
Rule(m23,(m22 + m22*m31*x1 - m21*m32*x1)/m32),Rule(x2,x1),Rule(x3,x1),Rule(x4,x1),
Rule(x5,x1),Rule(x6,x1),Rule(x7,x1),Rule(x8,x1),Rule(x9,x1),Rule(x10,x1),
Rule(y1,(-1 - m31*x1)/m32),Rule(y2,(-1 - m31*x1)/m32),Rule(y3,(-1 - m31*x1)/m32),
Rule(y4,(-1 - m31*x1)/m32),Rule(y5,(-1 - m31*x1)/m32),Rule(y6,(-1 - m31*x1)/m32),
Rule(y7,(-1 - m31*x1)/m32),Rule(y8,(-1 - m31*x1)/m32),Rule(y9,(-1 - m31*x1)/m32),
Rule(y10,(-1 - m31*x1)/m32)),List(Rule(dx,0),Rule(dy,0),Rule(m12,0),
Rule(m13,-(m11*x1)),Rule(m23,(m22 + m22*m31*x1 - m21*m32*x1)/m32),Rule(x2,x1),
Rule(x3,x1),Rule(x4,x1),Rule(x5,x1),Rule(x6,x1),Rule(x7,x1),Rule(x8,x1),Rule(x9,x1),
Rule(x10,x1),Rule(y1,(-1 - m31*x1)/m32),Rule(y2,(-1 - m31*x1)/m32),
Rule(y3,(-1 - m31*x1)/m32),Rule(y4,(-1 - m31*x1)/m32),Rule(y5,(-1 - m31*x1)/m32),
Rule(y6,(-1 - m31*x1)/m32),Rule(y7,(-1 - m31*x1)/m32),Rule(y8,(-1 - m31*x1)/m32),
Rule(y9,(-1 - m31*x1)/m32),Rule(y10,(-1 - m31*x1)/m32)),
List(Rule(dx,0),Rule(dy,0),Rule(m13,(m12 + m12*m31*x1 - m11*m32*x1)/m32),
Rule(m21,(m11*m22)/m12),Rule(m23,
(m12*m22 + m12*m22*m31*x1 - m11*m22*m32*x1)/(m12*m32)),Rule(x2,x1),Rule(x3,x1),
Rule(x4,x1),Rule(x5,x1),Rule(x6,x1),Rule(x7,x1),Rule(x8,x1),Rule(x9,x1),Rule(x10,x1),
Rule(y1,(-1 - m31*x1)/m32),Rule(y2,(-1 - m31*x1)/m32),Rule(y3,(-1 - m31*x1)/m32),
Rule(y4,(-1 - m31*x1)/m32),Rule(y5,(-1 - m31*x1)/m32),Rule(y6,(-1 - m31*x1)/m32),
Rule(y7,(-1 - m31*x1)/m32),Rule(y8,(-1 - m31*x1)/m32),Rule(y9,(-1 - m31*x1)/m32),
Rule(y10,(-1 - m31*x1)/m32)),List(Rule(dx,0),Rule(dy,0),
Rule(m13,(m11 - m12*m31*y1)/m31),Rule(m23,(m21 - m22*m31*y1)/m31),Rule(m32,0),
Rule(x1,-(1/m31)),Rule(x2,-(1/m31)),Rule(x3,-(1/m31)),Rule(x4,-(1/m31)),
Rule(x5,-(1/m31)),Rule(x6,-(1/m31)),Rule(x7,-(1/m31)),Rule(x8,-(1/m31)),
Rule(x9,-(1/m31)),Rule(x10,-(1/m31)),Rule(y2,y1),Rule(y3,y1),Rule(y4,y1),Rule(y5,y1),
Rule(y6,y1),Rule(y7,y1),Rule(y8,y1),Rule(y9,y1),Rule(y10,y1)),
List(Rule(dx,0),Rule(dy,0),Rule(m11,0),Rule(m12,0),Rule(m13,0),
Rule(m23,(m22 + m22*m31*x1 - m21*m32*x1)/m32),Rule(x2,x1),Rule(x3,x1),Rule(x4,x1),
Rule(x5,x1),Rule(x6,x1),Rule(x7,x1),Rule(x8,x1),Rule(x9,x1),Rule(x10,x1),
Rule(y1,(-1 - m31*x1)/m32),Rule(y2,(-1 - m31*x1)/m32),Rule(y3,(-1 - m31*x1)/m32),
Rule(y4,(-1 - m31*x1)/m32),Rule(y5,(-1 - m31*x1)/m32),Rule(y6,(-1 - m31*x1)/m32),
Rule(y7,(-1 - m31*x1)/m32),Rule(y8,(-1 - m31*x1)/m32),Rule(y9,(-1 - m31*x1)/m32),
Rule(y10,(-1 - m31*x1)/m32)),List(Rule(dx,0),Rule(dy,0),Rule(m12,0),
Rule(m13,-(m11*x1)),Rule(m22,0),Rule(m23,-(m21*x1)),Rule(x2,x1),Rule(x3,x1),
Rule(x4,x1),Rule(x5,x1),Rule(x6,x1),Rule(x7,x1),Rule(x8,x1),Rule(x9,x1),Rule(x10,x1),
Rule(y1,(-1 - m31*x1)/m32),Rule(y2,(-1 - m31*x1)/m32),Rule(y3,(-1 - m31*x1)/m32),
Rule(y4,(-1 - m31*x1)/m32),Rule(y5,(-1 - m31*x1)/m32),Rule(y6,(-1 - m31*x1)/m32),
Rule(y7,(-1 - m31*x1)/m32),Rule(y8,(-1 - m31*x1)/m32),Rule(y9,(-1 - m31*x1)/m32),
Rule(y10,(-1 - m31*x1)/m32)),List(Rule(dx,0),Rule(dy,0),
Rule(m13,(m11 - m12*m31*y1)/m31),Rule(m21,(m11*m22)/m12),
Rule(m23,-((m22*(-m11 + m12*m31*y1))/(m12*m31))),Rule(m32,0),Rule(x1,-(1/m31)),
Rule(x2,-(1/m31)),Rule(x3,-(1/m31)),Rule(x4,-(1/m31)),Rule(x5,-(1/m31)),
Rule(x6,-(1/m31)),Rule(x7,-(1/m31)),Rule(x8,-(1/m31)),Rule(x9,-(1/m31)),
Rule(x10,-(1/m31)),Rule(y2,y1),Rule(y3,y1),Rule(y4,y1),Rule(y5,y1),Rule(y6,y1),
Rule(y7,y1),Rule(y8,y1),Rule(y9,y1),Rule(y10,y1)),
List(Rule(dx,0),Rule(dy,0),Rule(m11,0),Rule(m12,0),Rule(m13,0),Rule(m22,0),
Rule(m23,-(m21*x1)),Rule(x2,x1),Rule(x3,x1),Rule(x4,x1),Rule(x5,x1),Rule(x6,x1),
Rule(x7,x1),Rule(x8,x1),Rule(x9,x1),Rule(x10,x1),Rule(y1,(-1 - m31*x1)/m32),
Rule(y2,(-1 - m31*x1)/m32),Rule(y3,(-1 - m31*x1)/m32),Rule(y4,(-1 - m31*x1)/m32),
Rule(y5,(-1 - m31*x1)/m32),Rule(y6,(-1 - m31*x1)/m32),Rule(y7,(-1 - m31*x1)/m32),
Rule(y8,(-1 - m31*x1)/m32),Rule(y9,(-1 - m31*x1)/m32),Rule(y10,(-1 - m31*x1)/m32)),
List(Rule(dx,0),Rule(dy,0),Rule(m11,0),Rule(m12,0),Rule(m13,0),
Rule(m23,(m21 - m22*m31*y1)/m31),Rule(m32,0),Rule(x1,-(1/m31)),Rule(x2,-(1/m31)),
Rule(x3,-(1/m31)),Rule(x4,-(1/m31)),Rule(x5,-(1/m31)),Rule(x6,-(1/m31)),
Rule(x7,-(1/m31)),Rule(x8,-(1/m31)),Rule(x9,-(1/m31)),Rule(x10,-(1/m31)),Rule(y2,y1),
Rule(y3,y1),Rule(y4,y1),Rule(y5,y1),Rule(y6,y1),Rule(y7,y1),Rule(y8,y1),Rule(y9,y1),
Rule(y10,y1)))