声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 10181|回复: 38

[分形与混沌] 天津大学张琪昌等编的<分岔与混沌理论及应用>中Mathematica程序1

[复制链接]
发表于 2006-11-9 11:27 | 显示全部楼层 |阅读模式

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

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

x
一维:
  1. aa = Table[a[i, j], {i, remainder}, {j, 2, korder}];
  2. hx = Table[0, {remainder}];
  3. Do[hx[] = Sum[a[i, j]
  4. x[1]^j, {j, 2, korder}] + O[x[1]]^(korder + 1), {i, 1, remainder}];
  5. my = Table[0, {remainder}];
  6. Do[y = hx[], {i, 1, remainder}];
  7. Do[nx = D[hx[], x[1]] dx[1] - dy == 0; my[] = LogicalExpand[nx], {i,
  8.       1, remainder}];
  9. myok = Flatten[my];
  10. aij1 = Flatten[aa];
  11. my2 = Solve[myok, aij1];
  12. my2 = Flatten[my2];
  13. dx[1] = Simplify[dx[1] /. my2];
  14. dx[1] = Normal[dx[1]];

  15. centermaniford = {}
  16. Do[dx[jj] = dx[jj];
  17.   dx[jj] = Expand[dx[jj]];
  18.   len = Length[dx[jj]];
  19.   eff = Table[0, {len}];
  20.   Do[item = dx[jj][];
  21.     ee = 0; Do[
  22.       eii = Exponent[item, x[ii]];
  23.       ee = ee + eii;
  24.       , {ii, 1, centerdimension}];
  25.     If[ee > korder, eff[] = eff[], eff[] = eff[] + item];
  26.     , {i, 1, len}];
  27.   dx[jj] = 0;
  28.   len1 = Length[eff];
  29.   Do[
  30.     dx[jj] = dx[jj] + eff[];
  31.     , {i, 1, len1}];
  32.   centermaniford = Join[{dx[jj]}, centermaniford];
  33.   , {jj, 1, centerdimension}]

  34. centermaniford = Reverse[centermaniford]
  35. centermaniford = Simplify[centermaniford]
复制代码
回复
分享到:

使用道具 举报

 楼主| 发表于 2006-11-9 11:29 | 显示全部楼层

天津大学张琪昌等编的<分岔与混沌理论及应用>中Mathematica程序2

  1. remainder = total - centerdimension;

  2. ahij2 = {};
  3. Do[
  4.     Do[
  5.       Do[
  6.         i = l - j; ahij2 = Join[{a[h, i, j]}, ahij2]
  7.         , {j, 0, l}]
  8.       , {l, 2, korder}]
  9.     , {h, 1, remainder}];
  10. Do[
  11.     hyx = 0;
  12.     Sum[Do[i = l - j; hyx = hyx + a[h, i, j] x[1]^i x[2]^
  13.         j, {j, 0, l}], {l, 2, korder}];
  14.     y[h] = hyx
  15.     , {h, 1, remainder}];
  16. nx = Table[0, {remainder}];
  17. coe = {};
  18. Do[
  19.     nx[[h]] = Sum[D[y[h], x[ii]] dx[ii], {ii, 1, centerdimension}] - dy[h]
  20.     , {h, 1, remainder}];
  21. Do[
  22.     Do[
  23.       Do[
  24.         i = ip - j;
  25.         mycoe = Coefficient[nx[[h]], x[1], i];
  26.         mycoe = Coefficient[mycoe, x[2], j] /. {x[1] -> 0, x[2] -> 0};
  27.         coe = Join[{mycoe == 0}, coe]
  28.         , {j, 0, ip}]
  29.       , {ip, 2, korder}]
  30.     , {h, 1, remainder}];
  31. me = Solve[coe, ahij2];
  32. me = Flatten[me];
  33. Do[
  34.     y = y /. me
  35.     , {i, 1, remainder}];

  36. centermaniford = {}
  37. Do[
  38.   dx[jj] = dx[jj];
  39.   dx[jj] = Expand[dx[jj]];
  40.   len = Length[dx[jj]];
  41.   eff = Table[0, {len}];
  42.   Do[
  43.     item = dx[jj][];
  44.     ee = 0;
  45.     Do[
  46.       eii = Exponent[item, x[ii]];
  47.       ee = ee + eii;
  48.       , {ii, 1, centerdimension}];
  49.     If[ee > korder, eff[] = eff[], eff[] = eff[] + item];
  50.     , {i, 1, len}];
  51.   dx[jj] = 0;
  52.   len1 = Length[eff];
  53.   Do[
  54.     dx[jj] = dx[jj] + eff[];
  55.     , {i, 1, len1}];
  56.   centermaniford = Join[{dx[jj]}, centermaniford];
  57.   , {jj, 1, centerdimension}]

  58. centermaniford = Reverse[centermaniford]
  59. centermaniford = Simplify[centermaniford]
复制代码
 楼主| 发表于 2006-11-9 11:29 | 显示全部楼层

天津大学张琪昌等编的<分岔与混沌理论及应用>中Mathematica程序3

  1. remainder = total - centerdimension;

  2. ahij2 = {};
  3. Do[
  4.     Do[
  5.       Do[
  6.         i = l - j; ahij2 = Join[{a[h, i, j]}, ahij2]
  7.         , {j, 0, l}]
  8.       , {l, 2, korder}]
  9.     , {h, 1, remainder}];
  10. Do[
  11.     hyx = 0;
  12.     Sum[Do[i = l - j; hyx = hyx + a[h, i, j] x[1]^i x[2]^
  13.         j, {j, 0, l}], {l, 2, korder}];
  14.     y[h] = hyx
  15.     , {h, 1, remainder}];
  16. nx = Table[0, {remainder}];
  17. coe = {};
  18. Do[
  19.     nx[[h]] = Sum[D[y[h], x[ii]] dx[ii], {ii, 1, centerdimension}] - dy[h]
  20.     , {h, 1, remainder}];
  21. Do[
  22.     Do[
  23.       Do[
  24.         i = ip - j;
  25.         mycoe = Coefficient[nx[[h]], x[1], i];
  26.         mycoe = Coefficient[mycoe, x[2], j] /. {x[1] -> 0, x[2] -> 0};
  27.         coe = Join[{mycoe == 0}, coe]
  28.         , {j, 0, ip}]
  29.       , {ip, 2, korder}]
  30.     , {h, 1, remainder}];
  31. me = Solve[coe, ahij2];
  32. me = Flatten[me];
  33. Do[
  34.     y = y /. me
  35.     , {i, 1, remainder}];

  36. centermaniford = {}
  37. Do[
  38.   dx[jj] = dx[jj];
  39.   dx[jj] = Expand[dx[jj]];
  40.   len = Length[dx[jj]];
  41.   eff = Table[0, {len}];
  42.   Do[
  43.     item = dx[jj][];
  44.     ee = 0;
  45.     Do[
  46.       eii = Exponent[item, x[ii]];
  47.       ee = ee + eii;
  48.       , {ii, 1, centerdimension}];
  49.     If[ee > korder, eff[] = eff[], eff[] = eff[] + item];
  50.     , {i, 1, len}];
  51.   dx[jj] = 0;
  52.   len1 = Length[eff];
  53.   Do[
  54.     dx[jj] = dx[jj] + eff[];
  55.     , {i, 1, len1}];
  56.   centermaniford = Join[{dx[jj]}, centermaniford];
  57.   , {jj, 1, centerdimension}]

  58. centermaniford = Reverse[centermaniford]
  59. centermaniford = Simplify[centermaniford]
复制代码
 楼主| 发表于 2006-11-9 11:31 | 显示全部楼层

天津大学张琪昌等编的<分岔与混沌理论及应用>中Mathematica程序规范形

  1. remainder = total - centerdimension;

  2. ahij2 = {};
  3. Do[
  4.     Do[
  5.       Do[
  6.         i = l - j; ahij2 = Join[{a[h, i, j]}, ahij2]
  7.         , {j, 0, l}]
  8.       , {l, 2, korder}]
  9.     , {h, 1, remainder}];
  10. Do[
  11.     hyx = 0;
  12.     Sum[Do[i = l - j; hyx = hyx + a[h, i, j] x[1]^i x[2]^
  13.         j, {j, 0, l}], {l, 2, korder}];
  14.     y[h] = hyx
  15.     , {h, 1, remainder}];
  16. nx = Table[0, {remainder}];
  17. coe = {};
  18. Do[
  19.     nx[[h]] = Sum[D[y[h], x[ii]] dx[ii], {ii, 1, centerdimension}] - dy[h]
  20.     , {h, 1, remainder}];
  21. Do[
  22.     Do[
  23.       Do[
  24.         i = ip - j;
  25.         mycoe = Coefficient[nx[[h]], x[1], i];
  26.         mycoe = Coefficient[mycoe, x[2], j] /. {x[1] -> 0, x[2] -> 0};
  27.         coe = Join[{mycoe == 0}, coe]
  28.         , {j, 0, ip}]
  29.       , {ip, 2, korder}]
  30.     , {h, 1, remainder}];
  31. me = Solve[coe, ahij2];
  32. me = Flatten[me];
  33. Do[
  34.     y = y /. me
  35.     , {i, 1, remainder}];

  36. centermaniford = {}
  37. Do[
  38.   dx[jj] = dx[jj];
  39.   dx[jj] = Expand[dx[jj]];
  40.   len = Length[dx[jj]];
  41.   eff = Table[0, {len}];
  42.   Do[
  43.     item = dx[jj][];
  44.     ee = 0;
  45.     Do[
  46.       eii = Exponent[item, x[ii]];
  47.       ee = ee + eii;
  48.       , {ii, 1, centerdimension}];
  49.     If[ee > korder, eff[] = eff[], eff[] = eff[] + item];
  50.     , {i, 1, len}];
  51.   dx[jj] = 0;
  52.   len1 = Length[eff];
  53.   Do[
  54.     dx[jj] = dx[jj] + eff[];
  55.     , {i, 1, len1}];
  56.   centermaniford = Join[{dx[jj]}, centermaniford];
  57.   , {jj, 1, centerdimension}]

  58. centermaniford = Reverse[centermaniford]
  59. centermaniford = Simplify[centermaniford]
复制代码

评分

1

查看全部评分

发表于 2006-11-14 15:54 | 显示全部楼层
能不能介绍一下这三个程序?
发表于 2006-11-15 07:10 | 显示全部楼层
原帖由 ieluxinhua 于 2006-11-14 15:54 发表
能不能介绍一下这三个程序?



自己找《分岔与混沌理论及应用》对照看一下就行了
发表于 2006-11-18 11:05 | 显示全部楼层
将这个程序用来计算实际问题时,无法得到正确结果,我试过几个"centerdimension=2"的例子,不知是何原因。

看来这个程序只能计算张琪昌<分岔与混沌理论及应用>书中的例4.4.1,输出正确的结果,其它问题的计算均报错。
 楼主| 发表于 2006-11-18 16:58 | 显示全部楼层
应该不会吧,我都试过啊
发表于 2006-11-19 07:39 | 显示全部楼层
原帖由 yzsldj 于 2006-11-18 11:05 发表
将这个程序用来计算实际问题时,无法得到正确结果,我试过几个"centerdimension=2"的例子,不知是何原因。

看来这个程序只能计算张琪昌<分岔与混沌理论及应用>书中的例4.4.1,输出正确的结果, ...



可以把你的例子给一下,大家看看
发表于 2006-11-19 08:32 | 显示全部楼层
我的问题是:

centerdimension=3;
dx[1]=y[1]+x[1]*z[1];
dy[1]=-x[1]+y[1]*z[1]-x[1]*w[1];
dz[1]=0;
dw[1]=-w[1]+alpha*x[1]^2;
korder=5;
total1=4;

要么出错,要么无输出结果。
我把代码也附上,请大家看看问题出在哪里。

  1. This program is to compute the centermaniford

  2. ReadList["e:\center1.txt"]
  3. remainder=total1-centerdimension
  4. "******************************"
  5. "To compute the zero space of the stable maniford and y[i]"
  6. "******************************"
  7. If [centerdimension==1,
  8. aa=Table[a[i,j],{i,remainder},{j,2,korder}];
  9. hx=Table[0,{remainder}];
  10. Do[
  11. hx[[i]]=Sum[a[i,j] x[1]^j,{j,2,korder}]+O[x[1]]^(korder+1),{i,1, remainder }];
  12. my=Table[0,{remainder}];
  13. Do[
  14. y[i]=hx[[i]],{i,1,remainder}];
  15. Do[
  16.   nx=D[hx[[i]],x[1]] dx[1]-dy[i]==0;
  17.   my[[i]]=LogicalExpand[nx]
  18. ,{i,1,remainder}];
  19. myok=Flatten[my];
  20. aij1=Flatten[aa];
  21. my2=Solve[myok,aij1];
  22. my2= Flatten [my2];
  23. dx[1]=Simplify[dx[1]/.my2];
  24. dx[1]=Normal[dx[1]];
  25. ]

  26. If[centerdimension==2,
  27.   ahij2={};
  28.   Do[
  29.      Do[
  30.         Do[
  31.             i=l-j; ahij2=Join[{a[h,i,j]},ahij2]
  32.         ,{j,0,l}]
  33.      ,{l,2,korder}]
  34.   ,{h,1,remainder}];
  35.   Do[
  36.     hyx=0;
  37.     Sum[Do[i=l-j;hyx=hyx+a[h,i,j] x[1]^i x[2]^j,{j,0,l}],{l,2,korder}];
  38.     y[h]=hyx
  39.   ,{h,1,remainder}] ;
  40.   nx=Table[0,{remainder}] ;
  41. coe={};
  42. Do[
  43.     nx[[h]]=Sum[D[y[h],x[ii]] dx[ii],{ii,1,centerdimension}]-dy[h]
  44.    ,{h,1,remainder}];
  45.    Do[
  46.      Do[
  47.         Do[
  48.             i=ip-j;
  49.             mycoe=Coefficient[nx[[h]],x[1],i];
  50.             mycoe=Coefficient[mycoe,x[2],j]/.{x[1]->0,x[2]->0} ;
  51.             coe=Join[{mycoe==0},coe]
  52.          ,{j,0,ip}]
  53.        ,{ip,2,korder}]
  54.        ,{h,1,remainder}];
  55.       me=Solve[coe,ahij2];
  56.       me=Flatten[me];
  57.        Do[
  58.           y[i]=y[i]/.me
  59.        ,{i,1,remainder}];
  60. ]

  61. If[centerdimension==3,
  62.   ahijp3={};
  63.   Do[
  64.      Do[
  65.         Do[
  66.            Do[
  67.               p=ip-i-j;
  68.               ahijp3=Join[{a[h,i,j,p]},ahijp3]
  69.            ,{j,0,ip-i}]
  70.          ,{i,0,ip}]
  71.       ,{ip,2,korder}]
  72.     ,{h,1,remainder}];

  73.   Do[
  74.     hyx=0;
  75.        Do[
  76.           Do[
  77.              Do[
  78.                  p=ip-i-j;
  79.                  hyx=hyx+a[h,i,j,p] x[1]^i x[2]^j x[3]^p
  80.               ,{j,0,ip-i}]
  81.             ,{i,0,ip}]
  82.           ,{ip,2,korder}];
  83.         y[h]=hyx;
  84.       ,{h,1,remainder}];
  85.   nx=Table[0,{remainder}];
  86. coe={};
  87. Do[
  88.    nx[[h]]=Sum[D[y[h],x[ii]] dx[ii],{ii,1,centerdimension}]-dy[h]
  89. ,{h,1,remainder}];
  90.   Do[
  91.      Do[
  92.         Do[
  93.            Do[
  94.                p=ip-i-j ;
  95.                mycoe=Coefficient[nx[[h]],x[1],i];
  96.                mycoe=Coefficient[mycoe,x[2],j] ;
  97. mycoe=Coefficient[mycoe,x[3],p]/.{x[1]->0,x[2]->0,x[3]->0};
  98.             coe=Join[{mycoe==0},coe]
  99.          ,{j,0,ip-i}]
  100.         ,{i,0,ip}]
  101.        ,{ip,2,korder}]
  102.       ,{h,1,remainder}];
  103.   me=Solve[coe,ahijp3];
  104.   me=Flatten[me];
  105.   Do[y[i]=y[i]/.me,{i,1,remainder}];
  106. ]

  107. If[centerdimension==4,
  108.   ahijpl4={};
  109.   Do[
  110.      Do[
  111.         Do[
  112.            Do[
  113.                Do[         
  114.      l=ip-i-j-p;
  115.               ahijp14=Join[{a[h,i,j,p,l]},ahijpl4]
  116.            ,{p,0,ip-i-j}]
  117.          ,{j,0,ip-i}]
  118.         {i,0,ip}]
  119.       ,{ip,2,korder}]
  120.     ,{h,1,remainder}];
  121.   Do[
  122.     hyx=0;
  123.        Do[
  124.           Do[
  125.              Do[
  126.                 Do[
  127.                  l=ip-i-j-p;
  128.                  hyx=hyx+a[h,i,j,p,l] x[1]^i x[2]^j x[3]^p x[4]^l;
  129.               ,{p,0,ip-i-j}]
  130.             ,{j,0,ip-i}]
  131.            ,{i,0,ip}]
  132.           ,{ip,2,korder}];
  133.         y[h]=hyx;
  134.      ,{h,1,remainder}];
  135.     nx=Table[0,{remainder}] ;
  136. coe={} ;
  137. Do[
  138.    nx[[h]]=Sum[D[y[h],x[ii]] dx[ii],{ii,1,centerdimension}]-dy[h]
  139. ,{h,1,remainder}] ;
  140.   Do[
  141.      Do[
  142.         Do[
  143.            Do[
  144.               Do[
  145.                l=ip-i-j-p;
  146.                mycoe=Coefficient[nx[[h]],x[1],i];
  147.                mycoe=Coefficient[mycoe,x[2],j] ;
  148.                mycoe=Coefficient[mycoe,x[3],p] ;
  149. mycoe=Coefficient[mycoe,x[4],l]/.{x[1]->0,x[2]->0,x[3]->0,x[4]->0};
  150.             coe=Join[{mycoe==0},coe]
  151.          ,{p,0,ip-i-j}]
  152.         ,{j,0,ip-i}]
  153. ,{i,0,ip}]
  154.     ,{ip,2,korder}]
  155.    ,{h,1,remainder}] ;
  156.   me=Solve[coe,ahijpl4] ;
  157.   me=Flatten[me];
  158.   Do[
  159. y[i]=y[i]/.me
  160. ,{i,1,remainder}];
  161. ]

  162. If[centerdimension==5,
  163.   ahijplm5={};
  164.   Do[
  165.      Do[
  166.         Do[
  167.            Do[
  168.                Do[
  169.      Do[         
  170.      m=ip-i-j-p-l;
  171.               ahijplm5=Join[{a[h,i,j,p,l,m]},ahijplm5]
  172.            ,{l,0,ip-i-j-p}]
  173.          ,{p,0,ip-i-j}]
  174.         ,{j,0,ip-i}]
  175.       ,{i,0,ip}]
  176.     ,{ip,2,korder}]
  177.     ,{h,1,remainder}];
  178.   Do[
  179.     hyx=0;
  180.        Do[
  181.           Do[
  182.              Do[  
  183.             Do[
  184.                 Do[
  185.                  m=ip-i-j-p-l;
  186.                  hyx=hyx+a[h,i,j,p,l,m] x[1]^i x[2]^j x[3]^p x[4]^l x[5]^m;
  187.               ,{l,0,ip-i-j-p}]
  188.             ,{p,0,ip-i-j}]
  189.            ,{j,0,ip-i}]
  190. ,{i,0,ip}]
  191.           ,{ip,2,korder}];
  192.         y[h]=hyx;
  193.      ,{h,1,remainder}];
  194.     nx=Table[0,{remainder}] ;
  195. coe={} ;
  196. Do[
  197.    nx[[h]]=Sum[D[y[h],x[ii]] dx[ii],{ii,1,centerdimension}]-dy[h]
  198. ,{h,1,remainder}] ;
  199.   Do[
  200.      Do[
  201.         Do[
  202.            Do[
  203.                Do[
  204.     Do[
  205.                m=ip-i-j-p-l;
  206.                mycoe=Coefficient[nx[[h]],x[1],i];
  207.                mycoe=Coefficient[mycoe,x[2],j] ;
  208.                mycoe=Coefficient[mycoe,x[3],p] ;
  209. mycoe=Coefficient[mycoe,x[4],l] ;
  210. mycoe=Coefficient[mycoe,x[5],m]/.{x[1]->0,x[2]->0,x[3]->0,x[4]->0,x[5]->0} ;
  211.             coe=Join[{mycoe==0},coe]
  212.          ,{l,0,ip-i-j-p}]
  213.         ,{p,0,ip-i-j}]
  214. ,{j,0,ip-i}]
  215. ,{i,0,ip}]
  216.     ,{ip,2,korder}]
  217.    ,{h,1,remainder}] ;
  218. Print[ "To solve the equation"];
  219.   me=Solve[coe,ahijplm5] ;
  220.   me=Flatten[me];
  221. Print[me]
  222.   Do[
  223. y[i]=y[i]/.me,
  224. {i,1,remainder}];
  225. ]

  226. If[centerdimension==6,
  227.   ahijplmn6={};
  228.   Do[
  229.      Do[
  230.         Do[
  231.           Do[
  232.            Do[
  233.                Do[
  234.      Do[         
  235.      n=ip-i-j-p-l-m;
  236.               ahijplmn6=Join[{a[h,i,j,p,l,m,n]},ahijplmn6];
  237.            ,{m,0,ip-i-j-p-l}]
  238.          ,{l,0,ip-i-j-p}]
  239.         ,{p,0,ip-i-j}]
  240.       ,{j,0,ip-i}]
  241.         ,{i,0,ip}]
  242.     ,{ip,2,korder}]
  243.     ,{h,1,remainder}];
  244.   Do[
  245.     hyx=0;
  246.        Do[
  247.           Do[
  248.              Do[  
  249.             Do[
  250.                Do[
  251.                 Do[
  252.                  n=ip-i-j-p-l-m;
  253.                  hyx=hyx+a[h,i,j,p,l,m,n] x[1]^i x[2]^j x[3]^p x[4]^l x[5]^m x[6]^n;
  254.               ,{m,0,ip-i-j-p-l}]
  255.             ,{l,0,ip-i-j-p}]
  256.            ,{p,0,ip-i-j}]
  257. ,{j,0,ip-i}]
  258. ,{i,0,ip}]
  259.           ,{ip,2,korder}];
  260.         y[h]=hyx;
  261.      ,{h,1,remainder}];
  262.     nx=Table[0,{remainder}] ;
  263. coe={} ;
  264. Do[
  265.    nx[[h]]=Sum[D[y[h],x[ii]] dx[ii],{ii,1,centerdimension}]-dy[h]
  266. ,{h,1,remainder}] ;
  267.   Do[
  268.      Do[
  269.         Do[
  270.            Do[
  271.                Do[
  272.     Do[
  273.         Do[
  274.                n=ip-i-j-p-l-m;
  275.                mycoe=Coefficient[nx[[h]],x[1],i];
  276.                mycoe=Coefficient[mycoe,x[2],j] ;
  277.                mycoe=Coefficient[mycoe,x[3],p] ;
  278. mycoe=Coefficient[mycoe,x[4],l] ;
  279. mycoe=Coefficient[mycoe,x[5],m] ;
  280. mycoe=Coefficient[mycoe,x[6],n]/.{x[1]->0,x[2]->0,x[3]->0,x[4]->0,x[5]->0,x[6]->0} ;
  281.             coe=Join[{mycoe==0},coe]
  282.          ,{m,0,ip-i-j-p-l}]
  283.         ,{l,0,ip-i-j-p}]
  284. ,{p,0,ip-i-j}]
  285. ,{j,0,ip-i}]
  286. ,{i,0,ip}]
  287.     ,{ip,2,korder}]
  288.    ,{h,1,remainder}] ;
  289. Print[ "To solve the equation "];
  290.   me=Solve[coe,ahijplmn6] ;
  291.   me=Flatten[me];
  292. Print[me]
  293.   Do[
  294. y[i]=y[i]/.me,{i,1,remainder}];
  295. ]
  296. "******************************"
  297. "To compute the centermaniford and crop the higher order items"
  298. "******************************"
  299. centermaniford={}
  300. Do[
  301.    dx[jj]=dx[jj];
  302.    dx[jj]=Expand[dx[jj]];
  303. len=Length[dx[jj]];
  304. eff=Table[0,{len}];
  305.   Do[
  306.      item=dx[jj][[i]];
  307.      ee=0;
  308.      Do[
  309.        eii=Exponent[item,x[ii]];
  310.        ee=ee+eii;
  311.        ,{ii,1,centerdimension}];
  312.        If[ee>korder,eff[[i]]=eff[[i]],eff[[i]]=eff[[i]]+item];
  313.      ,{i,1,len}];
  314.      dx[jj]=0;
  315.      len1=Length[eff];
  316.      Do[
  317.         dx[jj]=dx[jj]+eff[[i]];
  318.        ,{i,1,len1}];
  319.     centermaniford=Join[{dx[jj]},centermaniford];
  320.   ,{jj,1,centerdimension}]

  321. centermaniford=Reverse[centermaniford]>>e:\center.out
  322. centermaniford=Simplify[centermaniford]
  323. Print["This is the end of the program"]
复制代码
发表于 2007-6-14 21:35 | 显示全部楼层
一个不错的东西,顶上来!希望需要的人参考。程序中确实存在问题。有兴趣的可以一起研究一下!
发表于 2007-6-28 12:01 | 显示全部楼层
这本书我看了一两遍了,后面的程序还没有算过,我还打算用这些程序出点结果呢,不会真的有问题吧,我也拿例子试试看!
发表于 2007-6-28 12:34 | 显示全部楼层
试一下,才知道真正的问题在那里
发表于 2007-6-28 21:05 | 显示全部楼层
我算了一下书上的例4.4.1,为什么出来的结果是这样子的啊?
Image00000.jpg
发表于 2007-6-29 04:31 | 显示全部楼层
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-9-30 01:42 , Processed in 0.066317 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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