我被要求找到10个向量,这是MU的结果,我现在必须将它们绘制成枫树上的图形。我该怎么做?我试图绘制一个没有成功的序列,我似乎无法找到如何?谢谢你的帮助下面的代码。
M := Matrix([[.94, 0.9e-1], [0.6e-1, .91]]);
[0.94 0.09]
M := [ ]
[0.06 0.91]
u0 := Vector([.8, .2]);
[0.8]
u0 := [ ]
[0.2]
i)
MU := seq(M^k . u0, k = 5 .. 50, 5);
[0.688741062500000] [0.639374880868144]
MU := [ ], [ ],
[0.311258937500000] [0.360625119131855]
[0.617470843820250] [0.607751906216902] [0.603439561970441]
[ ], [ ], [ ],
[0.382529156179750] [0.392248093783097] [0.396560438029558]
[0.601526151918957] [0.600677161714123] [0.600300460249978]
[ ], [ ], [ ],
[0.398473848081042] [0.399322838285876] [0.399699539750021]
[0.600133315809110] [0.600059152932742]
[ ], [ ]
[0.399866684190889] [0.399940847067257]
答案 0 :(得分:0)
一些让你入门的想法。 (最后一个是动画。左键单击它并按下菜单栏附近出现的播放按钮。)
restart;
M := Matrix([[.94, 0.9e-1], [0.6e-1, .91]]):
u0 := Vector([.8, .2]):
MU := seq(M^k . u0, k = 5 .. 50, 5):
plots:-pointplot([MU], style=pointline);
plots:-pointplot([MU], style=point);
datamat:=`<|>`(MU)^%T:
plots:-display(
plot(datamat,style=line),
plot(datamat,style=point,symbolsize=15,
symbol=solidcircle,color=blue)
);
F:=proc(n::posint)
plots:-pointplot([MU[1..n]], style=pointline);
end proc:
plots:-animate(F,[trunc(n)], n=1..10, frames=10, title=``);