⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 d080501.txt

📁 (有源代码)数值分析作业,本文主要包括两个部分,第一部分是常微分方程(ODE)的三个实验题,第二部分是有关的拓展讨论,包括高阶常微分的求解和边值问题的求解(BVP).文中的算法和算例都是基于Matla
💻 TXT
📖 第 1 页 / 共 4 页
字号:
       horizontal and is numbered from left to right.
    AXIS XY  puts MATLAB into its default "Cartesian" axes mode.  The
       coordinate system origin is at the lower left corner.  The x
       axis is horizontal and is numbered from left to right.  The y
       axis is vertical and is numbered from bottom to top.
 
    AXIS EQUAL  sets the aspect ratio so that equal tick mark
       increments on the x-,y- and z-axis are equal in size. This
       makes SPHERE(25) look like a sphere, instead of an ellipsoid.
    AXIS IMAGE  is the same as AXIS EQUAL except that the plot
       box fits tightly around the data.
    AXIS SQUARE  makes the current axis box square in size.
    AXIS NORMAL  restores the current axis box to full size and
        removes any restrictions on the scaling of the units.
        This undoes the effects of AXIS SQUARE and AXIS EQUAL.
    AXIS VIS3D  freezes aspect ratio properties to enable rotation of
        3-D objects and overrides stretch-to-fill.
 
    AXIS OFF  turns off all axis labeling, tick marks and background.
    AXIS ON  turns axis labeling, tick marks and background back on.
 
    See also AXES.

diary off
diary on
y1-y1e
y1-y1e

ans =

  1.0e+019 *

  Columns 1 through 7 

         0   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000

  Columns 8 through 14 

   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000

  Columns 15 through 21 

   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000

  Columns 22 through 28 

   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000

  Columns 29 through 35 

   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000

  Columns 36 through 42 

   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000

  Columns 43 through 49 

   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000

  Columns 50 through 56 

   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000

  Columns 57 through 63 

   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000

  Columns 64 through 70 

   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000

  Columns 71 through 77 

   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000

  Columns 78 through 84 

   -0.0001   -0.0001   -0.0002   -0.0003   -0.0005   -0.0009   -0.0015

  Columns 85 through 91 

   -0.0025   -0.0042   -0.0069   -0.0116   -0.0193   -0.0322   -0.0537

  Columns 92 through 98 

   -0.0895   -0.1492   -0.2486   -0.4143   -0.6903   -1.1500   -1.9155

  Columns 99 through 101 

   -3.1905   -5.3134   -8.8481

disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
fprintf('%25.25f\n',y1-y1e)
fprintf('%25.25f\n',y1-y1e)
0.0000000000000000000000000
-0.0002837707001284162100000
-0.0009356370527959789700000
-0.0023137079418260598000000
-0.0050857749806008101000000
-0.0104803798170625130000000
-0.0207332859452264980000000
-0.0398772129254751920000000
-0.0751322881692146890000000
-0.1393442365395714000000000
-0.2552444892932896900000000
-0.4628698938862498800000000
-0.8324484916375354300000000
-1.4867205816146907000000000
-2.6395136656497016000000000
-4.6622656673700931000000000
-8.1985230228656292000000000
-14.3606613305382780000000000
-25.0673200568471660000000000
-43.6213282055268790000000000
-75.6981322497631480000000000
-131.0341055004391800000000000
-226.3068089052321700000000000
-390.0431574187678100000000000
-670.9744107610604300000000000
-1152.2444213490235000000000000
-1975.5491729837959000000000000
-3382.1132978366222000000000000
-5782.1893833605573000000000000
-9872.8416713254992000000000000
-16837.4114269795830000000000000
-28683.0717476764690000000000000
-48811.6895941514520000000000000
-82984.6373691745100000000000000
-140952.4330729730400000000000000
-239205.7442481592300000000000000
-405616.8259851709000000000000000
-687266.3619973808500000000000000
-1163635.2372712195000000000000000
-1968828.0089439154000000000000000
-3328994.4342339039000000000000000
-5625314.9298611879000000000000000
-9499968.8806324005000000000000000
-16034346.2159805300000000000000000
-27048637.1232533450000000000000000
-45605280.9861040120000000000000000
-76854688.3594741820000000000000000
-129455440.0391159100000000000000000
-217958393.8818969700000000000000000
-366807626.6472396900000000000000000
-617052615.6606445300000000000000000
-1037605551.8256378000000000000000000
-1744116026.8653259000000000000000000
-2930608591.3391724000000000000000000
-4922498917.8834229000000000000000000
-8265411511.6887207000000000000000000
-13873937734.4973140000000000000000000
-23280724613.9086910000000000000000000
-39053463559.8588870000000000000000000
-65492791322.9023440000000000000000000
-109800082500.9492200000000000000000000
-184031081871.5507800000000000000000000
-308363497582.2500000000000000000000000
-516561165453.1406200000000000000000000
-865109555811.6406200000000000000000000
-1448486407903.2344000000000000000000000
-2424682827978.6875000000000000000000000
-4057847658162.3750000000000000000000000
-6789531134372.0000000000000000000000000
-11357687076491.1250000000000000000000000
-18995414994616.0000000000000000000000000
-31762818552961.5000000000000000000000000
-53101051542012.5000000000000000000000000
-88757165845823.0000000000000000000000000
-148327688146004.0000000000000000000000000
-247834472664200.0000000000000000000000000
-414022542294584.0000000000000000000000000
-691530064621656.0000000000000000000000000
-1154848168563712.0000000000000000000000000
-1928267697731488.0000000000000000000000000
-3219142266463104.0000000000000000000000000
-5373350271842816.0000000000000000000000000
-8967759154702592.0000000000000000000000000
-14964359317716864.0000000000000000000000000
-24967167465024256.0000000000000000000000000
-41650370385995264.0000000000000000000000000
-69471767501566976.0000000000000000000000000
-115861489056854020.0000000000000000000000000
-193202384616775680.0000000000000000000000000
-322128963453923330.0000000000000000000000000
-537022197263671300.0000000000000000000000000
-895160850858254340.0000000000000000000000000
-1491961020848734200.0000000000000000000000000
-2486351699871006700.0000000000000000000000000
-4143023809607958500.0000000000000000000000000
-6902765907646808100.0000000000000000000000000
-11499547168060604000.0000000000000000000000000
-19155399191088464000.0000000000000000000000000
-31904762510927987000.0000000000000000000000000
-53134256023870636000.0000000000000000000000000
-88480869022534992000.0000000000000000000000000
disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
fprintf('%25.15f\n',y1-y1e)
fprintf('%25.15f\n',y1-y1e)
        0.000000000000000
       -0.000283770700128
       -0.000935637052796
       -0.002313707941826
       -0.005085774980601
       -0.010480379817063
       -0.020733285945226
       -0.039877212925475
       -0.075132288169215
       -0.139344236539571
       -0.255244489293290
       -0.462869893886250
       -0.832448491637535
       -1.486720581614691
       -2.639513665649702
       -4.662265667370093
       -8.198523022865629
      -14.360661330538278
      -25.067320056847166
      -43.621328205526879
      -75.698132249763148
     -131.034105500439180
     -226.306808905232170
     -390.043157418767810
     -670.974410761060430
    -1152.244421349023500
    -1975.549172983795900
    -3382.113297836622200
    -5782.189383360557300
    -9872.841671325499200
   -16837.411426979583000
   -28683.071747676469000
   -48811.689594151452000
   -82984.637369174510000
  -140952.433072973040000
  -239205.744248159230000
  -405616.825985170900000
  -687266.361997380850000
 -1163635.237271219500000
 -1968828.008943915400000
 -3328994.434233903900000
 -5625314.929861187900000
 -9499968.880632400500000
-16034346.215980530000000
-27048637.123253345000000
-45605280.986104012000000
-76854688.359474182000000
-129455440.039115910000000
-217958393.881896970000000
-366807626.647239690000000
-617052615.660644530000000
-1037605551.825637800000000
-1744116026.865325900000000
-2930608591.339172400000000
-4922498917.883422900000000
-8265411511.688720700000000
-13873937734.497314000000000
-23280724613.908691000000000
-39053463559.858887000000000
-65492791322.902344000000000
-109800082500.949220000000000
-184031081871.550780000000000
-308363497582.250000000000000
-516561165453.140620000000000
-865109555811.640620000000000
-1448486407903.234400000000000
-2424682827978.687500000000000
-4057847658162.375000000000000
-6789531134372.000000000000000
-11357687076491.125000000000000
-18995414994616.000000000000000
-31762818552961.500000000000000
-53101051542012.500000000000000
-88757165845823.000000000000000
-148327688146004.000000000000000
-247834472664200.000000000000000
-414022542294584.000000000000000
-691530064621656.000000000000000
-1154848168563712.000000000000000
-1928267697731488.000000000000000
-3219142266463104.000000000000000
-5373350271842816.000000000000000
-8967759154702592.000000000000000
-14964359317716864.000000000000000
-24967167465024256.000000000000000
-41650370385995264.000000000000000
-69471767501566976.000000000000000
-115861489056854020.000000000000000
-193202384616775680.000000000000000
-322128963453923330.000000000000000
-537022197263671300.000000000000000
-895160850858254340.000000000000000
-1491961020848734200.000000000000000
-2486351699871006700.000000000000000
-4143023809607958500.000000000000000
-6902765907646808100.000000000000000
-11499547168060604000.000000000000000
-19155399191088464000.000000000000000
-31904762510927987000.000000000000000
-53134256023870636000.000000000000000
-88480869022534992000.000000000000000
disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
fprintf('%+25.15f\n',y1-y1e)
fprintf('%+25.15f\n',y1-y1e)
       +0.000000000000000
       -0.000283770700128
       -0.000935637052796
       -0.002313707941826
       -0.005085774980601
       -0.010480379817063
       -0.020733285945226
       -0.039877212925475
       -0.075132288169215
       -0.139344236539571
       -0.255244489293290
       -0.462869893886250
       -0.832448491637535
       -1.486720581614691
       -2.639513665649702
       -4.662265667370093
       -8.198523022865629
      -14.360661330538278
      -25.067320056847166
      -43.621328205526879
      -75.698132249763148
     -131.034105500439180
     -226.306808905232170
     -390.043157418767810
     -670.974410761060430
    -1152.244421349023500
    -1975.549172983795900
    -3382.113297836622200
    -5782.189383360557300
    -9872.841671325499200
   -16837.411426979583000
   -28683.071747676469000
   -48811.689594151452000
   -82984.637369174510000
  -140952.433072973040000
  -239205.744248159230000
  -405616.825985170900000
  -687266.361997380850000
 -1163635.237271219500000
 -1968828.008943915400000
 -3328994.434233903900000
 -5625314.929861187900000
 -9499968.880632400500000
-16034346.215980530000000
-27048637.123253345000000
-45605280.986104012000000
-76854688.359474182000000
-129455440.039115910000000
-217958393.881896970000000
-366807626.647239690000000
-617052615.660644530000000
-1037605551.825637800000000
-1744116026.865325900000000
-2930608591.339172400000000
-4922498917.883422900000000
-8265411511.688720700000000
-13873937734.497314000000000
-23280724613.908691000000000
-39053463559.858887000000000
-65492791322.902344000000000
-109800082500.949220000000000
-184031081871.550780000000000
-308363497582.250000000000000
-516561165453.140620000000000
-865109555811.640620000000000
-1448486407903.234400000000000
-2424682827978.687500000000000
-4057847658162.375000000000000
-6789531134372.000000000000000
-11357687076491.125000000000000
-18995414994616.000000000000000
-31762818552961.500000000000000
-53101051542012.500000000000000
-88757165845823.000000000000000
-148327688146004.000000000000000
-247834472664200.000000000000000
-414022542294584.000000000000000
-691530064621656.000000000000000
-1154848168563712.000000000000000
-1928267697731488.000000000000000
-3219142266463104.000000000000000
-5373350271842816.000000000000000
-8967759154702592.000000000000000
-14964359317716864.000000000000000
-24967167465024256.000000000000000
-41650370385995264.000000000000000
-69471767501566976.000000000000000
-115861489056854020.000000000000000
-193202384616775680.000000000000000
-322128963453923330.000000000000000
-537022197263671300.000000000000000
-895160850858254340.000000000000000
-1491961020848734200.000000000000000
-2486351699871006700.000000000000000
-4143023809607958500.000000000000000
-6902765907646808100.000000000000000
-11499547168060604000.000000000000000
-19155399191088464000.000000000000000
-31904762510927987000.000000000000000
-53134256023870636000.000000000000000
-88480869022534992000.000000000000000
figure(5)

error=y1-y1e;

plot(x1(1:15),error(y1-y1e))
figure(5)

error=y1-y1e;

plot(x1(1:15),error(y1-y1e))
Warning: Subscript indices must be integer values.
??? Index into matrix is negative or zero.  See release notes on changes to 
logical indices.

figure(5)

error=y1-y1e;

plot(x1(1:15),error(1:15))
figure(5)

error=y1-y1e;

plot(x1(1:15),error(1:15))
figure(5)

error=y1-y1e;

plot(x1(1:20),error(1:20),'*')
figure(5)

error=y1-y1e;

plot(x1(1:20),error(1:20),'*')
help errorbar

 ERRORBAR Error bar plot.
    ERRORBAR(X,Y,L,U) plots the graph of vector X vs. vector Y with
    error bars specified by the vectors L and U.  L and U contain the
    lower and upper error ranges for each point in Y.  Each error bar
    is L(i) + U(i) long and is drawn a distance of U(i) above and L(i)
    below the points in (X,Y).  The vectors X,Y,L and U must all be
    the same length.  If X,Y,L and U are matrices then each column
    produces a separate line.
 
    ERRORBAR(X,Y,E) or ERRORBAR(Y,E) plots Y with error bars [Y-E Y+E].
    ERRORBAR(...,'LineSpec') uses the color and linestyle specified by
    the string 'LineSpec'.  See PLOT for possibilities.
 
    H = ERRORBAR(...) returns a vector of line handles.
 
    For example,
       x = 1:10;
       y = sin(x);
       e = std(y)*ones(size(x));
       errorbar(x,y,e)
    draws symmetric error bars of unit standard deviation.

figure
x = 1:10;
       y = sin(x);
       e = std(y)*ones(size(x));
       errorbar(x,y,e)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -