数值分析实验 C++

  • p9_944617
    了解作者
  • 26.5KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-24 06:16
    上传日期
1 高斯消元法 2 三次样条插值 3 牛顿插值 4 Romberg 算法 5 Runge-kuta法 6 非线性方程的迭代解法
数值分析.zip
  • 数值分析
  • 实验2.doc
    27KB
  • 实验1.doc
    26.5KB
  • ~$实验1.doc
    162B
  • 实验6.doc
    25KB
  • 实验5.doc
    23KB
  • 实验4.doc
    28KB
  • ~$实验6.doc
    162B
  • 实验3.doc
    26.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/62f2f84f5425817ffc27b1dd/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/62f2f84f5425817ffc27b1dd/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">&#23454;&#39564;<span class="_ _0"> </span><span class="ff2">4</span>&#65306;</div><div class="t m0 x1 h3 y3 ff1 fs0 fc0 sc0 ls0 ws0">&#31243;&#24207;&#20195;&#30721;&#65306;</div><div class="t m0 x1 h4 y4 ff2 fs1 fc1 sc0 ls0 ws0">#include<span class="fc0"> <span class="fc2">&lt;iostream&gt;</span></span></div><div class="t m0 x1 h4 y5 ff2 fs1 fc1 sc0 ls0 ws0">using<span class="fc0"> </span>namespace<span class="fc0"> std;</span></div><div class="t m0 x1 h4 y6 ff2 fs1 fc1 sc0 ls0 ws0">struct<span class="fc0"> Point{</span></div><div class="t m0 x2 h5 y7 ff2 fs1 fc1 sc0 ls0 ws0">int<span class="fc0"> n;<span class="_ _1"> </span><span class="fc3">//<span class="ff1">&#23384;&#20648;&#25968;&#25454;&#25968;</span></span></span></div><div class="t m0 x2 h5 y8 ff2 fs1 fc1 sc0 ls0 ws0">double<span class="fc0"> * p;<span class="_ _2"> </span><span class="fc3">//<span class="ff1">&#25351;&#21521;&#30003;&#35831;&#31354;&#38388;&#20301;&#32622;</span></span></span></div><div class="t m0 x2 h5 y9 ff2 fs1 fc1 sc0 ls0 ws0">struct<span class="fc0"> Point * next; <span class="fc3">//<span class="ff1">&#25351;&#21521;&#19979;&#19968;&#20010;&#33410;&#28857;</span></span></span></div><div class="t m0 x2 h5 ya ff2 fs1 fc1 sc0 ls0 ws0">struct<span class="fc0"> Point * prev; <span class="fc3">//<span class="ff1">&#25351;&#21521;&#19978;&#19968;&#20010;&#33410;&#28857;</span></span></span></div><div class="t m0 x1 h4 yb ff2 fs1 fc0 sc0 ls0 ws0">};</div><div class="t m0 x1 h4 yc ff2 fs1 fc1 sc0 ls0 ws0">int<span class="fc0"> main(){</span></div><div class="t m0 x2 h4 yd ff2 fs1 fc0 sc0 ls0 ws0">Point * Romberg();</div><div class="t m0 x2 h4 ye ff2 fs1 fc0 sc0 ls0 ws0">Point * head;</div><div class="t m0 x2 h4 yf ff2 fs1 fc0 sc0 ls0 ws0">head=Romberg();</div><div class="t m0 x2 h4 y10 ff2 fs1 fc1 sc0 ls0 ws0">while<span class="fc0">(head){</span></div><div class="t m0 x3 h4 y11 ff2 fs1 fc1 sc0 ls0 ws0">if<span class="fc0">(head-&gt;p){</span></div><div class="t m0 x4 h4 y12 ff2 fs1 fc1 sc0 ls0 ws0">for<span class="fc0">(</span>int<span class="fc0"> i=0;i&lt;head-&gt;n;i++){</span></div><div class="t m0 x5 h4 y13 ff2 fs1 fc0 sc0 ls0 ws0">cout&lt;&lt;head-&gt;p[i]&lt;&lt;<span class="fc2">" "</span>;</div><div class="t m0 x4 h4 y14 ff2 fs1 fc0 sc0 ls0 ws0">}</div><div class="t m0 x4 h4 y15 ff2 fs1 fc0 sc0 ls0 ws0">cout&lt;&lt;endl;</div><div class="t m0 x3 h4 y16 ff2 fs1 fc0 sc0 ls0 ws0">}</div><div class="t m0 x3 h4 y17 ff2 fs1 fc0 sc0 ls0 ws0">head=head-&gt;next;</div><div class="t m0 x2 h4 y18 ff2 fs1 fc0 sc0 ls0 ws0">}</div><div class="t m0 x2 h4 y19 ff2 fs1 fc1 sc0 ls0 ws0">return<span class="fc0"> 0;</span></div><div class="t m0 x1 h4 y1a ff2 fs1 fc0 sc0 ls0 ws0">}</div><div class="t m0 x1 h5 y1b ff2 fs1 fc3 sc0 ls0 ws0">//Romberg <span class="ff1">&#20989;&#25968;</span></div><div class="t m0 x1 h4 y1c ff2 fs1 fc1 sc0 ls0 ws0">#include<span class="fc0"> <span class="fc2">&lt;cmath&gt;</span></span></div><div class="t m0 x1 h4 y1d ff2 fs1 fc1 sc0 ls0 ws0">double<span class="fc0"> func(</span>double<span class="fc0"> x);</span></div><div class="t m0 x1 h4 y1e ff2 fs1 fc0 sc0 ls0 ws0">Point * Romberg(<span class="fc1">void</span>){</div><div class="t m0 x2 h5 y1f ff2 fs1 fc3 sc0 ls0 ws0">//<span class="ff1">&#25968;&#25454;&#36755;&#20837;</span></div><div class="t m0 x2 h5 y20 ff2 fs1 fc1 sc0 ls0 ws0">double<span class="fc0"> a,b;<span class="_ _3"> </span><span class="fc3">//<span class="ff1">&#31215;&#20998;&#19978;&#19979;&#38480;</span></span></span></div><div class="t m0 x2 h4 y21 ff2 fs1 fc1 sc0 ls0 ws0">double<span class="fc0"> h;<span class="_ _4"> </span><span class="fc3">//h=b-a</span></span></div><div class="t m0 x2 h4 y22 ff2 fs1 fc1 sc0 ls0 ws0">int<span class="fc0"> k;<span class="_ _5"> </span><span class="fc3">//T(k,_ )</span></span></div><div class="t m0 x2 h5 y23 ff2 fs1 fc1 sc0 ls0 ws0">double<span class="fc0"> err<span class="_ _6"></span>,eps;<span class="_ _7"> </span><span class="fc3">//<span class="ff1">&#31934;&#24230;&#25511;&#21046;&#65292;</span></span></span></div><div class="t m0 x2 h4 y24 ff2 fs1 fc1 sc0 ls0 ws0">double<span class="fc0"> x=0.0;</span></div><div class="t m0 x2 h5 y25 ff2 fs1 fc3 sc0 ls0 ws0">//<span class="ff1">&#25968;&#25454;&#21021;&#22987;&#21270;</span></div><div class="t m0 x2 h5 y26 ff2 fs1 fc0 sc0 ls0 ws0">cout&lt;&lt;<span class="fc2">"<span class="ff1">&#36755;&#20837;&#31215;&#20998;&#19978;&#19979;&#38480;</span>a<span class="ff1">&#21644;</span>b<span class="ff1">&#65306;</span>"</span>&lt;&lt;endl;</div><div class="t m0 x2 h4 y27 ff2 fs1 fc0 sc0 ls0 ws0">cin&gt;&gt;a&gt;&gt;b;</div><div class="t m0 x2 h5 y28 ff2 fs1 fc0 sc0 ls0 ws0">cout&lt;&lt;<span class="fc2">"<span class="ff1">&#36755;&#20837;&#31934;&#24230;&#25511;&#21046;&#25968;</span>eps"</span>&lt;&lt;endl;</div><div class="t m0 x2 h4 y29 ff2 fs1 fc0 sc0 ls0 ws0">cin&gt;&gt;eps;</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>
评论
    相关推荐
    • sift 算法 C++
      经典的sift算法,可以用于特征提取和配准,小伙伴们加油!!!
    • DES算法C++实现
      DES算法C++实现 DES算法C++实现 DES算法C++实现 DES算法C++实现
    • DES算法C++实现
      DES算法C++实现DES算法C++实现DES算法C++实现DES算法C++实现
    • kruscal算法C++
      kruscal算法,编译环境C++,送给算法小白~
    • DES算法C++实现
      Des算法C++实现,可用网上的算法工具验证,工程中包含测试窗体,MyDes为Des的实现,TestForm是测试类
    • AES算法C++实现
      AES算法C++实现AES算法C++实现AES算法C++实现AES算法C++实现
    • EM算法C++实现
      EM算法C++实现 EM算法C++实现 EM算法C++实现 EM算法C++实现 EM算法C++实现 EM算法C++实现 EM算法C++实现 EM算法C++实现
    • floyd算法c++
      floyd算法C++代码,可解决最小路径问题
    • CMAES算法C++
      CMA-ES算法C++包,里面有简单的使用说明注释,以及一个简单的函数拟合举例
    • 汉诺塔算法 C++
      汉诺塔算法 C++ 有截图 结果如下: 请输入盘子数:4 各步骤如下: A-->B A-->C B-->C A-->B C-->A C-->B A-->B A-->C B-->C B-->A C-->A B-->C A-->B A-->C B-->C 总步骤数为:15 Press any key to continue