Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Runge-Kutta-method/QBasic/runge-kutta-method.basic
Normal file
16
Task/Runge-Kutta-method/QBasic/runge-kutta-method.basic
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
y! = 1
|
||||
FOR i = 0 TO 100
|
||||
t = i / 10
|
||||
|
||||
IF t = INT(t) THEN
|
||||
actual! = ((t ^ 2 + 4) ^ 2) / 16
|
||||
PRINT USING "y(##) = ###.###### Error = "; t; y;
|
||||
PRINT actual - y
|
||||
END IF
|
||||
|
||||
k1! = t * SQR(y)
|
||||
k2! = (t + .05) * SQR(y + .05 * k1)
|
||||
k3! = (t + .05) * SQR(y + .05 * k2)
|
||||
k4! = (t + .1) * SQR(y + .1 * k3)
|
||||
y = y + .1 * (k1 + 2 * (k2 + k3) + k4) / 6
|
||||
NEXT i
|
||||
Loading…
Add table
Add a link
Reference in a new issue