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

📄 d080501.txt

📁 (有源代码)数值分析作业,本文主要包括两个部分,第一部分是常微分方程(ODE)的三个实验题,第二部分是有关的拓展讨论,包括高阶常微分的求解和边值问题的求解(BVP).文中的算法和算例都是基于Matla
💻 TXT
📖 第 1 页 / 共 4 页
字号:
figure(6)

errorbar(x1,y1e,error)
figure(6)

errorbar(x1,y1e,error)
Warning: Requested axes limit range too small; rendering with minimum range allowed by machine precision.
> In E:\matlab5\MATLAB\toolbox\matlab\graph2d\zoom.m at line 534
Warning: Requested axes limit range too small; rendering with minimum range allowed by machine precision.
> In E:\matlab5\MATLAB\toolbox\matlab\graph2d\zoom.m at line 534
figure(6)

errorbar(x1,y1e,error,
figure(6)

errorbar(x1,y1e,error,
??? orbar(x1,y1e,error,
                       |
Missing variable or function.

figure(6)

errorbar(x1,y1e,error,'*')
figure(6)

errorbar(x1,y1e,error,'*')
figure(6)

errorbar(x1,y1e,error,'*','makersize','1')
figure(6)

errorbar(x1,y1e,error,'*','makersize','1')
??? Error using ==> errorbar
Too many input arguments.

figure(6)

errorbar(x1,y1e,error,'o')
figure(6)

errorbar(x1,y1e,error,'o')
figure(6)

errorbar(x1,y1e,error,':')
figure(6)

errorbar(x1,y1e,error,':')
figure(6)

errorbar(x1,y1e,error,':')

title('errorbar')
figure(6)

errorbar(x1,y1e,error,':')

title('errorbar')
figure(5)

error=y1-y1e;

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

error=y1-y1e;

plot(x1(1:20),error(1:20),'*')
disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
title('error')
title('error')
disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
title('Error')
title('Error')
whos
  Name          Size         Bytes  Class

  ans           1x1              8  double array
  b             1x5             40  double array
  e             1x10            80  double array
  error         1x101          808  double array
  x             1x10            80  double array
  x1            1x101          808  double array
  x2            1x101          808  double array
  x2fh001       1x101          808  double array
  x3            1x101          808  double array
  x4            1x101          808  double array
  y             1x10            80  double array
  y1            1x101          808  double array
  y1e           1x101          808  double array
  y2            1x101          808  double array
  y2fh001       1x101          808  double array
  y3            1x101          808  double array
  y4            1x101          808  double array

Grand total is 1248 elements using 9984 bytes

disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
[x5,y5]=rk_wjl('funtest1',0,1,1,0.01,-10);

[x6,y6]=rk_wjl('funtest1',0,1,1,0.3,-10);
[x5,y5]=rk_wjl('funtest1',0,1,1,0.01,-10);

[x6,y6]=rk_wjl('funtest1',0,1,1,0.3,-10);
figure(7)

plot(x5,y5,x6,y6)
figure(7)

plot(x5,y5,x6,y6)
title('\alpha=10,step with 0.01 and 0l3')
title('\alpha=10,step with 0.01 and 0l3')
disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
[x5,y5]=rk_wjl('funtest1',0,1,1,0.01,-10);

[x6,y6]=rk_wjl('funtest1',0,1,1,0.2,-10);

figure(7)

plot(x5,y5,x6,y6)

title('\alpha=-10,step with 0.01 and 0l3')
[x5,y5]=rk_wjl('funtest1',0,1,1,0.01,-10);

[x6,y6]=rk_wjl('funtest1',0,1,1,0.2,-10);

figure(7)

plot(x5,y5,x6,y6)

title('\alpha=-10,step with 0.01 and 0l3')
[x5,y5]=rk_wjl('funtest1',0,1,1,0.01,-10);

[x6,y6]=rk_wjl('funtest1',0,1,1,0.3,-10);

figure(7)

plot(x5,y5,x6,y6)

title('\alpha=-10,step with 0.01 and 0l3')
[x5,y5]=rk_wjl('funtest1',0,1,1,0.01,-10);

[x6,y6]=rk_wjl('funtest1',0,1,1,0.3,-10);

figure(7)

plot(x5,y5,x6,y6)

title('\alpha=-10,step with 0.01 and 0l3')
disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
[x5,y5]=rk_wjl('funtest1',0,1,1,0.01,-10);

[x6,y6]=rk_wjl('funtest1',0,1,1,0.3,-10);

figure(7)

plot(x5,y5,x6,y6)

title('\alpha=-10,step with 0.01 and 0.3')
[x5,y5]=rk_wjl('funtest1',0,1,1,0.01,-10);

[x6,y6]=rk_wjl('funtest1',0,1,1,0.3,-10);

figure(7)

plot(x5,y5,x6,y6)

title('\alpha=-10,step with 0.01 and 0.3')
y5

y5 =

  Columns 1 through 7 

    1.0000    0.9148    0.8387    0.7708    0.7103    0.6565    0.6088

  Columns 8 through 14 

    0.5666    0.5293    0.4966    0.4679    0.4429    0.4212    0.4025

  Columns 15 through 21 

    0.3866    0.3731    0.3619    0.3527    0.3453    0.3396    0.3353

  Columns 22 through 28 

    0.3325    0.3308    0.3303    0.3307    0.3321    0.3343    0.3372

  Columns 29 through 35 

    0.3408    0.3450    0.3498    0.3550    0.3608    0.3669    0.3734

  Columns 36 through 42 

    0.3802    0.3873    0.3947    0.4024    0.4102    0.4183    0.4266

  Columns 43 through 49 

    0.4350    0.4436    0.4523    0.4611    0.4701    0.4791    0.4882

  Columns 50 through 56 

    0.4974    0.5067    0.5161    0.5255    0.5350    0.5445    0.5541

  Columns 57 through 63 

    0.5637    0.5733    0.5830    0.5927    0.6025    0.6122    0.6220

  Columns 64 through 70 

    0.6318    0.6417    0.6515    0.6614    0.6712    0.6811    0.6910

  Columns 71 through 77 

    0.7009    0.7108    0.7207    0.7307    0.7406    0.7506    0.7605

  Columns 78 through 84 

    0.7705    0.7804    0.7904    0.8003    0.8103    0.8203    0.8302

  Columns 85 through 91 

    0.8402    0.8502    0.8602    0.8702    0.8802    0.8901    0.9001

  Columns 92 through 98 

    0.9101    0.9201    0.9301    0.9401    0.9501    0.9601    0.9701

  Columns 99 through 101 

    0.9801    0.9901    1.0000

y6

y6 =

    1.0000    1.6750    2.4906    3.4996    1.9749

disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
50*0.08

ans =

     4

[x5,y5]=rk_wjl('funtest1',0,1,1,0.01,-50);

[x6,y6]=rk_wjl('funtest1',0,1,1,0.08,-50);

figure(7)

plot(x5,y5,x6,y6)

title('\alpha=-50,step with 0.01 and 0.08')
[x5,y5]=rk_wjl('funtest1',0,1,1,0.01,-50);

[x6,y6]=rk_wjl('funtest1',0,1,1,0.08,-50);

figure(7)

plot(x5,y5,x6,y6)

title('\alpha=-50,step with 0.01 and 0.08')
ylim([-1,500])
ylim([-1,500])
ylim([-1,1])
ylim([-1,1])
ylim([-1,5000])
ylim([-1,5000])
ylim([-1,50])
ylim([-1,50])
disp(which('rk51test'));
E:\matlabtemp\rk51test.m
clear 'e:\matlabtemp\rk51test.m'
x=linspace(1:100)
??? Input argument 'n' is undefined.

Error in ==> E:\matlab5\MATLAB\toolbox\matlab\elmat\linspace.m
On line 16  ==> y = [d1+(0:n-2)*(d2-d1)/(n-1) d2];

x=linspace(1,100,100)

x =

  Columns 1 through 12 

     1     2     3     4     5     6     7     8     9    10    11    12

  Columns 13 through 24 

    13    14    15    16    17    18    19    20    21    22    23    24

  Columns 25 through 36 

    25    26    27    28    29    30    31    32    33    34    35    36

  Columns 37 through 48 

    37    38    39    40    41    42    43    44    45    46    47    48

  Columns 49 through 60 

    49    50    51    52    53    54    55    56    57    58    59    60

  Columns 61 through 72 

    61    62    63    64    65    66    67    68    69    70    71    72

  Columns 73 through 84 

    73    74    75    76    77    78    79    80    81    82    83    84

  Columns 85 through 96 

    85    86    87    88    89    90    91    92    93    94    95    96

  Columns 97 through 100 

    97    98    99   100

x=reshape(x,8)
??? Error using ==> reshape
Size vector must have at least two elements.

100/8

ans =

   12.5000

x=linspace(1,100,12*8);
plot(x)
x=reshape(x,12,8)

x =

  Columns 1 through 7 

    1.0000   13.5053   26.0105   38.5158   51.0211   63.5263   76.0316
    2.0421   14.5474   27.0526   39.5579   52.0632   64.5684   77.0737
    3.0842   15.5895   28.0947   40.6000   53.1053   65.6105   78.1158
    4.1263   16.6316   29.1368   41.6421   54.1474   66.6526   79.1579
    5.1684   17.6737   30.1789   42.6842   55.1895   67.6947   80.2000
    6.2105   18.7158   31.2211   43.7263   56.2316   68.7368   81.2421
    7.2526   19.7579   32.2632   44.7684   57.2737   69.7789   82.2842
    8.2947   20.8000   33.3053   45.8105   58.3158   70.8211   83.3263
    9.3368   21.8421   34.3474   46.8526   59.3579   71.8632   84.3684
   10.3789   22.8842   35.3895   47.8947   60.4000   72.9053   85.4105
   11.4211   23.9263   36.4316   48.9368   61.4421   73.9474   86.4526
   12.4632   24.9684   37.4737   49.9789   62.4842   74.9895   87.4947

  Column 8 

   88.5368
   89.5789
   90.6211
   91.6632
   92.7053
   93.7474
   94.7895
   95.8316
   96.8737
   97.9158
   98.9579
  100.0000

x=reshape(x,10,8)
??? Error using ==> reshape
To RESHAPE the number of elements must not change.

x=reshape(x,14,8)
??? Error using ==> reshape
To RESHAPE the number of elements must not change.

size(y5)

ans =

     1   101

size(y6)

ans =

     1    14

10*8

ans =

    80

yy5=y5(1:10*8);
yy5=reshape(y5,10,8)
??? Error using ==> reshape
To RESHAPE the number of elements must not change.

yy5=reshape(yy5,10,8)

yy5 =

  Columns 1 through 7 

    1.0000    0.1068    0.2000    0.3000    0.4000    0.5000    0.6000
    0.6168    0.1141    0.2100    0.3100    0.4100    0.5100    0.6100
    0.3882    0.1225    0.2200    0.3200    0.4200    0.5200    0.6200
    0.2534    0.1315    0.2300    0.3300    0.4300    0.5300    0.6300
    0.1755    0.1409    0.2400    0.3400    0.4400    0.5400    0.6400
    0.1322    0.1506    0.2500    0.3500    0.4500    0.5500    0.6500
    0.1099    0.1603    0.2600    0.3600    0.4600    0.5600    0.6600
    0.1003    0.1702    0.2700    0.3700    0.4700    0.5700    0.6700
    0.0984    0.1801    0.2800    0.3800    0.4800    0.5800    0.6800
    0.1011    0.1901    0.2900    0.3900    0.4900    0.5900    0.6900

  Column 8 

    0.7000
    0.7100
    0.7200
    0.7300
    0.7400
    0.7500
    0.7600
    0.7700
    0.7800
    0.7900

plot(y5)
plot(yy5(:))
index=linspace(1:8:80)
??? Input argument 'n' is undefined.

Error in ==> E:\matlab5\MATLAB\toolbox\matlab\elmat\linspace.m
On line 16  ==> y = [d1+(0:n-2)*(d2-d1)/(n-1) d2];

index=1:8:80;
index

index =

     1     9    17    25    33    41    49    57    65    73

x5

x5 =

  Columns 1 through 7 

         0    0.0100    0.0200    0.0300    0.0400    0.0500    0.0600

  Columns 8 through 14 

    0.0700    0.0800    0.0900    0.1000    0.1100    0.1200    0.1300

  Columns 15 through 21 

    0.1400    0.1500    0.1600    0.1700    0.1800    0.1900    0.2000

  Columns 22 through 28 

    0.2100    0.2200    0.2300    0.2400    0.2500    0.2600    0.2700

  Columns 29 through 35 

    0.2800    0.2900    0.3000    0.3100    0.3200    0.3300    0.3400

  Columns 36 through 42 

    0.3500    0.3600    0.3700    0.3800    0.3900    0.4000    0.4100

  Columns 43 through 49 

    0.4200    0.4300    0.4400    0.4500    0.4600    0.4700    0.4800

  Columns 50 through 56 

    0.4900    0.5000    0.5100    0.5200    0.5300    0.5400    0.5500

  Columns 57 through 63 

    0.5600    0.5700    0.5800    0.5900    0.6000    0.6100    0.6200

  Columns 64 through 70 

    0.6300    0.6400    0.6500    0.6600    0.6700    0.6800    0.6900

  Columns 71 through 77 

    0.7000    0.7100    0.7200    0.7300    0.7400    0.7500    0.7600

  Columns 78 through 84 

    0.7700    0.7800    0.7900    0.8000    0.8100    0.8200    0.8300

  Columns 85 through 91 

    0.8400    0.8500    0.8600    0.8700    0.8800    0.8900    0.9000

⌨️ 快捷键说明

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