Mathematica程序 中国剩余定理.zip

  • qweqqqwe
    了解作者
  • Mathematica
    开发工具
  • 2KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 10 积分
    下载积分
  • 1
    下载次数
  • 2020-04-03 10:48
    上传日期
中国剩余定理的mathematica实现
Mathematica程序 中国剩余定理.zip
  • Mathematica程序 中国剩余定理.doc
    14.5KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/627662c677d3727348bc4c4a/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/627662c677d3727348bc4c4a/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">Mathematica<span class="_ _0"> </span><span class="ff2">&#31243;&#24207;</span> <span class="ff2">&#20013;&#22269;&#21097;&#20313;&#23450;&#29702;</span>-<span class="ff2">&#29289;&#19981;&#30693;&#20854;&#25968;</span></div><div class="t m0 x1 h3 y3 ff1 fs0 fc0 sc0 ls0 ws0">(*<span class="ff2">&#33258;&#28982;&#25968;<span class="_ _0"> </span></span>x<span class="_ _0"> </span><span class="ff2">&#38500;&#20197;</span>{m}<span class="ff2">&#20313;</span>{n},<span class="ff2">&#21017;<span class="_ _0"> </span></span>x<span class="_ _0"> </span><span class="ff2">&#26368;&#23567;&#20540;&#26159;&#22810;&#23569;</span>?*)</div><div class="t m0 x1 h4 y4 ff1 fs0 fc0 sc0 ls0 ws0">arraym1 = {};</div><div class="t m0 x1 h4 y5 ff1 fs0 fc0 sc0 ls0 ws0">arraym2 = {};</div><div class="t m0 x1 h4 y6 ff1 fs0 fc0 sc0 ls0 ws0">arrayn1 = {};</div><div class="t m0 x1 h4 y7 ff1 fs0 fc0 sc0 ls0 ws0">chengji = 1;</div><div class="t m0 x1 h3 y8 ff1 fs0 fc0 sc0 ls0 ws0">guocheng = {{"<span class="ff2">&#38500;&#25968;</span>:", "<span class="ff2">&#20313;&#25968;</span>:",</div><div class="t m0 x1 h3 y9 ff1 fs0 fc0 sc0 ls0 ws0"> "<span class="ff2">&#20854;&#23427;&#38500;&#25968;&#30340;&#26368;</span>", "<span class="ff2">&#28385;&#36275;&#35813;&#34892;&#26465;&#20214;</span>"}};</div><div class="t m0 x1 h4 ya ff1 fs0 fc0 sc0 ls0 ws0">guocheng =</div><div class="t m0 x1 h3 yb ff1 fs0 fc0 sc0 ls0 ws0">Append[guocheng, {" ", " ", "<span class="ff2">&#23567;&#20844;&#20493;&#25968;</span>: ", "<span class="ff2">&#30340;&#19968;&#20010;&#25968;&#23383;</span>: "}];</div><div class="t m0 x1 h4 yc ff1 fs0 fc0 sc0 ls0 ws0">jieguo = 0;</div><div class="t m0 x1 h4 yd ff1 fs0 fc0 sc0 ls0 ws0">p1 =.;</div><div class="t m0 x1 h4 ye ff1 fs0 fc0 sc0 ls0 ws0">p2 =.;</div><div class="t m0 x1 h4 yf ff1 fs0 fc0 sc0 ls0 ws0">For[i = 1, i &gt; -1, i++,</div><div class="t m0 x1 h4 y10 ff1 fs0 fc0 sc0 ls0 ws0">p1 = Input[StringJoin[</div><div class="t m0 x1 h3 y11 ff1 fs0 fc0 sc0 ls0 ws0"> "<span class="ff2">&#24050;&#36755;&#20837;&#30340;&#38500;&#25968;&#26377;</span>:</div><div class="t m0 x1 h4 y12 ff1 fs0 fc0 sc0 ls0 ws0"> ",</div><div class="t m0 x1 h4 y13 ff1 fs0 fc0 sc0 ls0 ws0"> T<span class="_ _1"></span>oString[arraym1],</div><div class="t m0 x1 h4 y14 ff1 fs0 fc0 sc0 ls0 ws0"> "</div><div class="t m0 x1 h3 y15 ff1 fs0 fc0 sc0 ls0 ws0"> <span class="ff2">&#35831;&#36755;&#20837;&#38500;&#25968;</span>,m", T<span class="_ _1"></span>oString[i], ":</div><div class="t m0 x1 h3 y16 ff1 fs0 fc0 sc0 ls0 ws0"> ", "(<span class="ff2">&#30830;&#35748;&#36755;&#20837;&#25353;</span>'OK',<span class="ff2">&#19981;&#20877;&#36755;&#20837;&#25353;</span>'Cancel')"</div><div class="t m0 x1 h4 y17 ff1 fs0 fc0 sc0 ls0 ws0"> ], Prime[i]];</div><div class="t m0 x1 h4 y18 ff1 fs0 fc0 sc0 ls0 ws0">If[p1 == $Canceled, Break[];];</div><div class="t m0 x1 h4 y19 ff1 fs0 fc0 sc0 ls0 ws0">If[p1 != 0,</div><div class="t m0 x1 h3 y1a ff1 fs0 fc0 sc0 ls0 ws0"> p2 = Input[StringJoin["<span class="ff2">&#38500;&#25968;&#26159;</span>", T<span class="_ _1"></span>oString[p1], "</div><div class="t m0 x1 h3 y1b ff1 fs0 fc0 sc0 ls0 ws0"> <span class="ff2">&#35831;&#36755;&#20837;&#20313;&#25968;<span class="_ _0"> </span></span>n", T<span class="_ _2"></span>oString[i], ":"], Floor[Prime[i]*Random[]]]</div><div class="t m0 x1 h4 y1c ff1 fs0 fc0 sc0 ls0 ws0"> ];</div><div class="t m0 x1 h4 y1d ff1 fs0 fc0 sc0 ls0 ws0">If[p2 != $Canceled, , ,</div><div class="t m0 x1 h4 y1e ff1 fs0 fc0 sc0 ls0 ws0"> arraym1 = <span class="_ _1"></span>Append[arraym1, p1];</div><div class="t m0 x1 h4 y1f ff1 fs0 fc0 sc0 ls0 ws0"> chengji = LCM[chengji, p1];</div><div class="t m0 x1 h4 y20 ff1 fs0 fc0 sc0 ls0 ws0"> arrayn1 = <span class="_ _1"></span>Append[arrayn1, p2]</div><div class="t m0 x1 h4 y21 ff1 fs0 fc0 sc0 ls0 ws0"> ];</div><div class="t m0 x1 h4 y22 ff1 fs0 fc0 sc0 ls0 ws0">];</div><div class="t m0 x1 h4 y23 ff1 fs0 fc0 sc0 ls0 ws0">arraym2 = chengji/GCD[chengji, arraym1];</div><div class="t m0 x1 h4 y24 ff1 fs0 fc0 sc0 ls0 ws0">arraym3 = ConstantArray[0, Length[arraym1]];</div><div class="t m0 x1 h4 y25 ff1 fs0 fc0 sc0 ls0 ws0">For[i = 1, i &lt;= Length[arraym1], i++,</div><div class="t m0 x1 h4 y26 ff1 fs0 fc0 sc0 ls0 ws0">For[j = 0, j &lt; arraym1[[i]], j++,</div><div class="t m0 x1 h4 y27 ff1 fs0 fc0 sc0 ls0 ws0"> arraym3[[i]] = arraym2[[i]]*j;</div><div class="t m0 x1 h4 y28 ff1 fs0 fc0 sc0 ls0 ws0"> If[Mod[arraym3[[i]], arraym1[[i]]] == arrayn1[[i]], Break[];];</div><div class="t m0 x1 h4 y29 ff1 fs0 fc0 sc0 ls0 ws0"> ]</div><div class="t m0 x1 h3 y2a ff1 fs0 fc0 sc0 ls0 ws0"> If[j == arraym1[[i]], jieguo = "<span class="ff2">&#26080;&#35299;</span>"; Break[];];</div><div class="t m0 x1 h4 y2b ff1 fs0 fc0 sc0 ls0 ws0">guocheng =</div><div class="t m0 x1 h4 y2c ff1 fs0 fc0 sc0 ls0 ws0"> <span class="_ _1"></span>Append[guocheng, {arraym1[[i]], arrayn1[[i]], arraym2[[i]],</div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐
    • Mathematica.zip
      mathematica编程教程介绍。。。。
    • Mathematica.zip
      Mathematica使用指南,作为数学运算及其他的必备神器很值得推荐
    • mathematica合集
      this file contains:A Mathematica Primer for Physicists-CRC Press (2018).pdf An Elementary Introduction to the Wolfram Language 2ed.pdf An Engineer's guide to Mathematica.pdf An Introduction to ...
    • Mathematica 2.0
      经典数学软件,科学计算软件。史前的2.0的版本,windows的,有GUI。虽然肯定不如现在的新版本或流行版本功能丰富强大。不过做些基本的大数计算,高精度计算,一般常用的数学、算术计算,像素因子分解,因式分解,...
    • Mathematica软件介绍
      Mathematica是一款功能强大的符号计算系 统,由C语言编写而成, Mathematica(1.2)版本大 约由15万行C代码组成,是功能最强大的单应用 程序之一,他内容丰富,覆盖了初等数学,微积分 和线性代数等数学领域,还包含近百个...
    • Matering Mathematica
      高清pdf格式。 I Mastering Mathematica as a Symbolic Pocket Calculator II Mastering Mathematica as a Programming Language III Mastering Knowledge Representation in Mathematica
    • mathematica7.0
      最新版本的mathematica! 下载地址http://verycd.com
    • Mathematica 4.0
      Mathematica是一款科学计算软件,很好地结合了数值和符号计算引擎、图形系统、编程语言、文本系统、和与其他应用程序的高级连接。很多功能在相应领域内处于世界领先地位,它也是使用最广泛的数学软件之一。
    • Mathematica:Mathematica软件包
      Mathematica机器人函数包: 一、机械臂 1 三维模型导入 2 正\逆运动学计算 3 碰撞检测 4 路径规划(RRT) 5 正\逆动力学计算(递归牛顿-欧拉法) 6 运动控制 二、移动机器人 1 Reeds-Shepp Curve and Dubins ...
    • Mathematica 11.3
      Mathematica 11.3(简体中文版) | 2018年4月 版本 11.3 对 Mathematica 和 Wolfram 语言在数学计算、音频和图像处理、系统建模、机器学习和神经网络以及更多方面的功能进行了扩展,并添加了多种全新前端特性。 ...