Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: RK4 for a vectorial function

by bliako (Monsignor)
on Nov 26, 2021 at 08:33 UTC ( #11139139=note: print w/replies, xml ) Need Help??


in reply to RK4 for a vectorial function

for 0<t<25 I get beautiful oscillations in columns 3 and 4 of the output file

side remark: You don't need to declare subs k1_1 etc. as variables (e.g. my $k1_1;) (and you could also implement them outside the RK4_... subs, EDIT: did you mean to use them as closures? you don't seem to because you pass them the important params and step is "global" in their scope). EDIT: also you can stop calling subs using the &mysub() notation, instead mysub() is valid.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11139139]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2022-05-17 13:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (65 votes). Check out past polls.

    Notices?