Kirish bitiruv malakaviy ishining dolzarbligi


Runge-Kutta 4-tartib usuli


Download 342.86 Kb.
bet7/8
Sana16.06.2023
Hajmi342.86 Kb.
#1517208
1   2   3   4   5   6   7   8
Bog'liq
ODDIY DIFFERENSIAL TENGLAMALAR SISTEMASI.doc.

Runge-Kutta 4-tartib usuli:
Differensial tenglamani yechish algoritmi
4-tartibdagi Runge-Kutta usuli.





Fayl funksiyasi : _

f=faaan(x) funksiyasi


f = x ;


Fayl dasturi:

a=5;
b=10;


h=0,05;
t0=0;
tk=5;
y=0;
y1=0;
fprintf('MRG uchun qiymatlar jadvali\n');
fprintf('---------------------------------\n');
fprintf('| t | x | y |\n');
fprintf('---------------------------------\n');
t=t0;
x=(a/b)*sqrt(t);
fprintf('| %4.2f | %4.4f | %4.4f |\n',t,x,y);
esa tf=faaan(x);
k=h*f;
s=k;
y=y+k/2;
t=t+h/2;
x=(a/b)*sqrt(t);
j=1:2 uchun
f=faaan(x);
k=h*f;
s=s+2*k;
y=y1+k/2;
oxiri
t=t+h/2;
x=(a/b)*sqrt(t);
y=y+k/2;
f=faaan(x);
k=h*f;
s=s+k;
y=y1+s/6;
fprintf('| %4.2f | %4.4f | %4.4f |\n',t,x,y);
chizma(t,x,'r*')
panjara yoqilgan
to'xtab tur
chizma(t,y,'k+')
xlabel('t');
ylabel('y');
y1=y;
oxiri


Dastur natijasi:


MWG uchun qiymatlar jadvali

---------------------------------------
| t | x | y |
---------------------------------------
| 0,00 | 0,0000 | 0,0000 |
| 0,05 | 0.1118 | 0,0036 |
| 0,10 | 0,1581 | 0,0104 |
| 0,15 | 0,1936 | 0,0192 |
| 0,20 | 0,2236 | 0,0297 |
| 0,25 | 0,2500 | 0,0415 |
| 0,30 | 0,2739 | 0,0546 |
| 0,35 | 0,2958 | 0,0689 |
| 0,40 | 0,3162 | 0,0842 |
| 0,45 | 0,3354 | 0,1005 |
| 0,50 | 0,3536 | 0,1177 |
| 0,55 | 0,3708 | 0,1358 |
| 0,60 | 0,3873 | 0,1548 |
| 0,65 | 0,4031 | 0,1745 |
| 0,70 | 0,4183 | 0,1951 |
| 0,75 | 0.4330 | 0,2163 |
| 0,80 | 0,4472 | 0,2384 |
| 0,85 | 0.4610 | 0,2611 |
| 0,90 | 0,4743 | 0,2844 |
| 0,95 | 0,4873 | 0,3085 |
| 1.00 | 0,5000 | 0,3332 |
| 1.05 | 0,5123 | 0,3585 |
| 1.10 | 0,5244 | 0,3844 |
| 1.15 | 0,5362 | 0.4109 |
| 1.20 | 0,5477 | 0.4380 |
| 1.25 | 0,5590 | 0,4657 |
| 1.30 | 0,5701 | 0,4939 |
| 1.35 | 0,5809 | 0,5227 |
| 1.40 | 0,5916 | 0,5520 |
| 1.45 | 0,6021 | 0,5818 |
| 1.50 | 0,6124 | 0,6122 |
| 1.55 | 0,6225 | 0,6431 |
| 1.60 | 0,6325 | 0,6745 |
| 1.65 | 0,6423 | 0,7063 |
| 1.70 | 0,6519 | 0,7387 |
| 1.75 | 0,6614 | 0,7715 |
| 1.80 | 0,6708 | 0,8048 |
| 1.85 | 0,6801 | 0,8386 |
| 1.90 | 0,6892 | 0,8728 |
| 1.95 | 0,6982 | 0,9075 |
| 2.00 | 0,7071 | 0,9426 |
| 2.05 | 0,7159 | 0,9782 |
| 2.10 | 0,7246 | 1.0142 |
| 2.15 | 0,7331 | 1.0507 |
| 2.20 | 0,7416 | 1.0875 |
| 2.25 | 0,7500 | 1.1248 |
| 2.30 | 0,7583 | 1.1625 |
| 2.35 | 0,7665 | 1.2007 |
| 2.40 | 0,7746 | 1.2392 |
| 2.45 | 0,7826 | 1.2781 |
| 2.50 | 0,7906 | 1.3175 |
| 2.55 | 0,7984 | 1.3572 |

Download 342.86 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling