r={{3,1.1,2.5,4.7,1.4,4.5,4.8},
{3,1.1,2.5,4.7,1.4,5,5},
{3,1.1,2.5,4.7,1.4,4.9,5},
{3,1.1,2.5,4.7,1.4,1,0.9},
{3,1.1,2.5,4.7,1.4,5,4.7},
{3,1.1,2.5,4.7,1.4,1.2,1},
{3,1.1,2.5,4.7,1.4,5.1,5.1}};
d=Length[r];
n=IntegerPart[(d-1)/3]
While[Variance[m]>0.0001,{m=TrimmedMean[Transpose[r],n/d],r[[All,1;;(d-n)]]=Drop[m,-n]}];
我想将每一次while循环的m变量的变化情况画到同一个图中,如何实现,请指点。
{3,1.1,2.5,4.7,1.4,5,5},
{3,1.1,2.5,4.7,1.4,4.9,5},
{3,1.1,2.5,4.7,1.4,1,0.9},
{3,1.1,2.5,4.7,1.4,5,4.7},
{3,1.1,2.5,4.7,1.4,1.2,1},
{3,1.1,2.5,4.7,1.4,5.1,5.1}};
d=Length[r];
n=IntegerPart[(d-1)/3]
While[Variance[m]>0.0001,{m=TrimmedMean[Transpose[r],n/d],r[[All,1;;(d-n)]]=Drop[m,-n]}];
我想将每一次while循环的m变量的变化情况画到同一个图中,如何实现,请指点。