声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1461|回复: 2

[稳定性与分岔] Mathematica计算中心流形

[复制链接]
发表于 2009-10-28 20:05 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

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

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

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

报错:

报错及结果

报错及结果
回复
分享到:

使用道具 举报

发表于 2009-11-5 10:12 | 显示全部楼层
这个程序已经讨论过,肯定是有问题的,最好能让《分岔与混沌理论及应用》的作者出来更正一下。
发表于 2009-11-8 16:09 | 显示全部楼层

回复

确实是这样的!
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-12-19 14:30 , Processed in 0.070326 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表