Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
35
Task/Euler-method/Yabasic/euler-method.basic
Normal file
35
Task/Euler-method/Yabasic/euler-method.basic
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
print "Time ";
|
||||
tiempo = 0.0
|
||||
while tiempo <= 100.1
|
||||
print tiempo using "#######";
|
||||
tiempo = tiempo + 10.0
|
||||
wend
|
||||
print
|
||||
|
||||
print "Dif eq ";
|
||||
tiempo = 0.0
|
||||
while tiempo <= 100.1
|
||||
temperatura = 20.0 + (100.0-20.0) * exp(-0.07*tiempo)
|
||||
print temperatura using "####.##";
|
||||
tiempo = tiempo + 10.0
|
||||
wend
|
||||
print
|
||||
|
||||
Euler_(2)
|
||||
Euler_(5)
|
||||
Euler_(10)
|
||||
end
|
||||
|
||||
sub Euler_(paso)
|
||||
local tiempo, temperatura
|
||||
tiempo = 0
|
||||
temperatura = 100.0
|
||||
print "Step ", paso using "##", " ";
|
||||
|
||||
while tiempo <= 100
|
||||
if mod(tiempo, 10) = 0 print temperatura using "####.##";
|
||||
temperatura = temperatura + (paso) * (-0.07*(temperatura-20.0))
|
||||
tiempo = tiempo + paso
|
||||
end while
|
||||
print
|
||||
end sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue