这道题用matlab怎么做
2个回答
展开全部
>>odefun=inline('(y^2-t-2)/(4*t+4)','t','y');
>>[t,y]=ode45(odefun,[0,1],2);
>>[t,y]
ans =
0 2.0000
0.0250 2.0124
0.0500 2.0247
0.0750 2.0368
0.1000 2.0488
0.1250 2.0607
0.1500 2.0724
0.1750 2.0840
0.2000 2.0954
0.2250 2.1068
0.2500 2.1180
0.2750 2.1292
0.3000 2.1402
0.3250 2.1511
0.3500 2.1619
0.3750 2.1726
0.4000 2.1832
0.4250 2.1937
0.4500 2.2042
0.4750 2.2145
0.5000 2.2247
0.5250 2.2349
0.5500 2.2450
0.5750 2.2550
0.6000 2.2649
0.6250 2.2748
0.6500 2.2845
0.6750 2.2942
0.7000 2.3038
0.7250 2.3134
0.7500 2.3229
0.7750 2.3323
0.8000 2.3416
0.8250 2.3509
0.8500 2.3601
0.8750 2.3693
0.9000 2.3784
0.9250 2.3874
0.9500 2.3964
0.9750 2.4053
1.0000 2.4142
>>[t,y]=ode45(odefun,[0,1],2);
>>[t,y]
ans =
0 2.0000
0.0250 2.0124
0.0500 2.0247
0.0750 2.0368
0.1000 2.0488
0.1250 2.0607
0.1500 2.0724
0.1750 2.0840
0.2000 2.0954
0.2250 2.1068
0.2500 2.1180
0.2750 2.1292
0.3000 2.1402
0.3250 2.1511
0.3500 2.1619
0.3750 2.1726
0.4000 2.1832
0.4250 2.1937
0.4500 2.2042
0.4750 2.2145
0.5000 2.2247
0.5250 2.2349
0.5500 2.2450
0.5750 2.2550
0.6000 2.2649
0.6250 2.2748
0.6500 2.2845
0.6750 2.2942
0.7000 2.3038
0.7250 2.3134
0.7500 2.3229
0.7750 2.3323
0.8000 2.3416
0.8250 2.3509
0.8500 2.3601
0.8750 2.3693
0.9000 2.3784
0.9250 2.3874
0.9500 2.3964
0.9750 2.4053
1.0000 2.4142
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询