gouxu 发表于 2009-10-28 20:05

Mathematica计算中心流形

我按照天津大学张琪昌所著《分岔与混沌理论及应用》上给的程序算书上62页的例子4.4.1,
报错,程序所读取的文本文件center.txt必须和程序在同一目录下吗?

代码:
center.txt
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
centerdimension=1;
dx=x y;
dy=-y+arf*x^2;
korder=5;
total=2;
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
ReadList["center.txt"]
remainder = total - centerdimension
aa = Table, {i, remainder}, {j, 2, korder}];
hx = Table;
Do = Sum x^j, {j, 2, korder}] +
      O]^(korder + 1), {i, 1, remainder}];
my = Table;
Do = hx[], {i, 1, remainder}];
Do], x] dx - dy == 0; my[] = LogicalExpand, {i,
      1, remainder}];
myok = Flatten;
aij1 = Flatten;
my2 = Solve;
my2 = Flatten;
dx = Simplify /. my2];
dx = Normal];
centermaniford = {}
Do = dx;
dx = Expand];
len = Length];
eff = Table;
Do[];
    ee = 0; Do];
      ee = ee + eii;, {ii, 1, centerdimension}];
    If] = eff[], eff[] =
eff[] + item];, {i, 1, len}];
dx = 0;
len1 = Length;
Do = dx + eff[];, {i, 1, len1}];
centermaniford = Join[{dx}, centermaniford];, {jj, 1, centerdimension}]
centermaniford = Reverse
centermaniford = Simplify
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

报错:

yzsldj 发表于 2009-11-5 10:12

这个程序已经讨论过,肯定是有问题的,最好能让《分岔与混沌理论及应用》的作者出来更正一下。

lushuang8 发表于 2009-11-8 16:09

回复

确实是这样的!
页: [1]
查看完整版本: Mathematica计算中心流形