http://zh.numberempire.com/cgi-bin/render2.cgi?%5Cnocache%20%5CLARGE%204%5C%2C%7B%5Cit%20m_%7B23%7D%7D%5E2%2B%5Cleft%28%5Cleft%282%5C%2C%7B%5Cit%20ay_4%7D%2B2%5C%2C%7B%5Cit%20ay_3%7D%2B2%5C%2C%20%7B%5Cit%20ay_2%7D%2B2%5C%2C%7B%5Cit%20ay_1%7D%5Cright%29%5C%2C%7B%5Cit%20m_%7B22%7D%7D%2B%5Cleft%282%5C%2C%7B%5Cit%20ax_4%7D%2B2%20%5C%2C%7B%5Cit%20ax_3%7D%2B2%5C%2C%7B%5Cit%20ax_2%7D%2B2%5C%2C%7B%5Cit%20ax_1%7D%5Cright%29%5C%2C%7B%5Cit%20m_%7B21%7D%7D-2%5C%2C%20%7B%5Cit%20by_4%7D-2%5C%2C%7B%5Cit%20by_3%7D-2%5C%2C%7B%5Cit%20by_2%7D-2%5C%2C%7B%5Cit%20by_1%7D%5Cright%29%5C%2C%20%7B%5Cit%20m_%7B23%7D%7D%2B%5Cleft%28%7B%5Cit%20ay_4%7D%5E2%2B%7B%5Cit%20ay_3%7D%5E2%2B%7B%5Cit%20ay_2%7D%5E2%2B%7B%5Cit%20ay_1%7D%20%5E2%5Cright%29%5C%2C%7B%5Cit%20m_%7B22%7D%7D%5E2%2B%5Cleft%28%5Cleft%282%5C%2C%7B%5Cit%20ax_4%7D%5C%2C%7B%5Cit%20ay_4%7D%2B2%5C%2C%20%7B%5Cit%20ax_3%7D%5C%2C%7B%5Cit%20ay_3%7D%2B2%5C%2C%7B%5Cit%20ax_2%7D%5C%2C%7B%5Cit%20ay_2%7D%2B2%5C%2C%7B%5Cit%20ax_1%7D%5C%2C%20%7B%5Cit%20ay_1%7D%5Cright%29%5C%2C%7B%5Cit%20m_%7B21%7D%7D-2%5C%2C%7B%5Cit%20ay_4%7D%5C%2C%7B%5Cit%20by_4%7D-2%5C%2C%20%7B%5Cit%20ay_3%7D%5C%2C%7B%5Cit%20by_3%7D-2%5C%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cit%20by_3%7D%5E2%2B%7B%5Cit%20by_2%7D%5E2%2B%7B%5Cit%20by_1%7D%5E2%2B%7B%5Cit%20bx_4%7D%5E2%2B%7B%5Cit%20bx_3%7D%5E2%2B%20%7B%5Cit%20bx_2%7D%5E2%2B%7B%5Cit%20bx_1%7D%5E2 好凌乱啊。
我都没了方向 本帖最后由 dianyancao 于 2012-5-23 10:27 编辑
化简后的形式如下,c[]为已知数,求该式关于 {m11,m12,m13}的最小值不知道如何下手,:(凌乱中...
Minimize[c1*m11^2 + c2*m12^2 + c3*m13^2 + c4*m11*m12 + c5*m11*m13 +
c6*m12*m13 + c7*m11 + c8*m12 + c9*m13 + c10, {m11, m12,m13}] 原来很简单,这个问题好像叫最小2乘解,直接配方就可以了
结果:http://img.my.csdn.net/uploads/201205/24/1337821629_4739.jpg 附上Mathematica的代码f =
c1*m11^2 + c2*m12^2 + c3*m13^2 + c4*m11*m12 + c5*m11*m13 +
c6*m12*m13 + c7*m11 + c8*m12 + c9*m13 + c10
rt = {t1, t2, t3}
r = {x11, x12, x13}
{x11, x12, x13}
mm1 = CoefficientList, m11]
r[] = (mm1[]/(2*mm1[]))
rt[] = -(mm1[]/(2*mm1[]))^2*mm1[] + mm1[]
mm2 = CoefficientList], m12]
r[] = (mm2[]/(2*mm2[]))
rt[] = -(mm2[]/(2*mm2[]))^2*mm2[] + mm2[]
mm3 = CoefficientList], m13]
r[] = (mm3[]/(2*mm3[]))
rt[] = -(mm3[]/(2*mm3[]))^2*mm3[] + mm3[]
Solve[{m11 + r[] == 0, m12 + r[] == 0, m13 + r[] == 0}, {m11,
m12, m13}] 遇到一个新问题,如果是采用矩阵元 1-范数即取绝对值,得到的结果形如:
http://zh.numberempire.com/equation.render?\huge \sum_{i=1}^{n}{\mid x_i*m_1 + y_i*m_2 + m_3 - z_i\mid }
如何计算该式的最小值呢,用分类讨论貌似很低效
页:
1
[2]