Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
32
Task/Euler-method/True-BASIC/euler-method.basic
Normal file
32
Task/Euler-method/True-BASIC/euler-method.basic
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
SUB euler (paso)
|
||||
LET tiempo = 0
|
||||
LET temperatura = 100
|
||||
PRINT USING "Step ## ": paso;
|
||||
DO WHILE tiempo <= 100
|
||||
IF (REMAINDER(tiempo,10)) = 0 THEN PRINT USING "###.##": temperatura;
|
||||
LET temperatura = temperatura+paso*(-.07*(temperatura-20))
|
||||
LET tiempo = tiempo+paso
|
||||
LOOP
|
||||
PRINT
|
||||
END SUB
|
||||
|
||||
PRINT "Time ";
|
||||
LET tiempo = 0
|
||||
DO WHILE tiempo <= 100.1
|
||||
PRINT USING "######": tiempo;
|
||||
LET tiempo = tiempo+10
|
||||
LOOP
|
||||
PRINT
|
||||
PRINT "Dif eq ";
|
||||
LET tiempo = 0
|
||||
DO WHILE tiempo <= 100.1
|
||||
LET temperatura = 20+(100-20)*EXP(-.07*tiempo)
|
||||
PRINT USING "###.##": temperatura;
|
||||
LET tiempo = tiempo+10
|
||||
LOOP
|
||||
PRINT
|
||||
|
||||
CALL Euler (2)
|
||||
CALL Euler (5)
|
||||
CALL Euler (10)
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue