早教吧 育儿知识 作业答案 考试题库 百科 知识分享

用matlab解Lorenz微分方程组的问题dx/dt=a(y-x)dy/dt=rx-y-xzdz/dt=-bx+xy解微分方程的时候出现问题S=dsolve('Dx=10*(y-x)','Dy=28*x-y-x*z','Dz=-2.6*x+x*y','x(0)=1','y(0)=2','z(0)=3');disp([S.x,S.y,S.z])Warning:Explicitsolutioncould

题目详情
用matlab解Lorenz微分方程组的问题
dx/dt=a(y-x)
dy/dt=rx-y-xz
dz/dt=-bx+xy
解微分方程的时候出现问题
S=dsolve('Dx=10*(y-x)','Dy=28*x-y-x*z','Dz=-2.6*x+x*y','x(0)=1','y(0)=2','z(0)=3');
disp([S.x,S.y,S.z])
Warning: Explicit solution could not be found.
> In dsolve at 333
? Access to an object's fields is only permitted within its methods.
▼优质解答
答案和解析
没有解析解,就计算数值解吧.
function myode45
[t,xyz]=ode45(@fun,0:1,[1 2 3]) % 'x(0)=1','y(0)=2','z(0)=3');
plot(t,xyz)
function f=fun(t,X)
x=X(1);y=X(2);z=X(3);
dx=10*(y-x);
dy=28*x-y-x*z;
dz=-2.6*x+x*y;
f=[dx;dy;dz];
结果:
t =
0
0.0044
0.0087
0.0131
0.0175
0.0357
0.0538
0.0720
0.0902
0.1120
0.1338
0.1555
0.1773
0.1938
0.2104
0.2269
0.2435
0.2561
0.2686
0.2812
0.2938
0.3064
0.3190
0.3316
0.3442
0.3553
0.3664
0.3775
0.3886
0.3981
0.4075
0.4170
0.4264
0.4388
0.4511
0.4635
0.4758
0.4902
0.5046
0.5191
0.5335
0.5484
0.5634
0.5784
0.5933
0.6078
0.6223
0.6368
0.6513
0.6650
0.6787
0.6923
0.7060
0.7198
0.7336
0.7473
0.7611
0.7748
0.7884
0.8021
0.8158
0.8294
0.8431
0.8567
0.8704
0.8841
0.8978
0.9115
0.9252
0.9391
0.9530
0.9670
0.9809
0.9857
0.9904
0.9952
1.0000
xyz =
1.0000 2.0000 3.0000
1.0449 2.1027 2.9975
1.0924 2.2100 2.9955
1.1426 2.3221 2.9938
1.1955 2.4394 2.9927
1.4479 2.9896 2.9958
1.7594 3.6561 3.0166
2.1420 4.4648 3.0678
2.6099 5.4465 3.1693
3.3059 6.8949 3.4017
4.1859 8.7089 3.8230
5.2910 10.9471 4.5609
6.6626 13.6388 5.8172
7.9038 15.9722 7.2827
9.3295 18.4930 9.3708
10.9296 21.0526 12.2541
12.6610 23.3885 16.0864
14.0190 24.7922 19.7005
15.3492 25.6225 23.8900
16.5748 25.6508 28.5360
17.6016 24.6885 33.4144
18.3310 22.6026 38.2107
18.6596 19.4541 42.5220
18.5140 15.4456 46.0040
17.8737 10.8723 48.4345
16.9118 6.6846 49.6332
15.6188 2.6685 50.0145
14.0581 -0.9609 49.7262
12.3054 -4.0693 48.9687
10.7265 -6.2572 48.1235
9.1119 -8.0333 47.2096
7.5014 -9.4210 46.3193
5.9272 -10.4599 45.5232
3.9640 -11.3679 44.6996
2.1496 -11.8411 44.1651
0.5135 -11.9534 43.9300
-0.9264 -11.7622 43.9718
-2.3470 -11.2093 44.3100
-3.4811 -10.3500 44.8766
-4.3287 -9.2345 45.5781
-4.8978 -7.9131 46.3257
-5.2092 -6.3830 47.0674
-5.2582 -4.7732 47.7115
-5.0759 -3.1644 48.2204
-4.6996 -1.6311 48.5855
-4.1893 -0.2793 48.8156
-3.5779 0.8948 48.9449
-2.9060 1.8607 48.9999
-2.2095 2.6059 49.0107
-1.5593 3.1069 49.0041
-0.9407 3.4197 48.9927
-0.3734 3.5589 48.9846
0.1289 3.5434 48.9831
0.5602 3.3932 48.9873
0.9091 3.1331 48.9940
1.1736 2.7892 48.9994
1.3554 2.3858 48.9995
1.4587 1.9504 48.9911
1.4922 1.5021 48.9734
1.4646 1.0605 48.9467
1.3853 0.6409 48.9124
1.2645 0.2557 48.8734
1.1129 -0.0848 48.8325
0.9407 -0.3737 48.7926
0.7572 -0.6077 48.7566
0.5701 -0.7865 48.7267
0.3877 -0.9105 48.7041
0.2164 -0.9828 48.6894
0.0609 -1.0080 48.6827
-0.0774 -0.9909 48.6832
-0.1931 -0.9378 48.6900
-0.2848 -0.8559 48.7018
-0.3523 -0.7523 48.7170
-0.3700 -0.7131 48.7227
-0.3851 -0.6724 48.7287
-0.3975 -0.6305 48.7348
-0.4074 -0.5878 48.7409
看了 用matlab解Lorenz...的网友还看了以下: