odeEuler: odeEuler

Description Usage Arguments Value Note Author(s) Examples

View source: R/main.r

Description

Calculates ordinary differentials equations using Euler's method

Usage

1
odeEuler(func,a,b,m,y0,VERBOSE)

Arguments

func

STRING Derivative formula write in STRING.

a

INT Lower boundary

b

INT Upper boundary

m

INT Amount of intervals

y0

INT Start value

VERBOSE

OPTIONAL BOOLEAN See results for each iteration

VECTOR

OPTIONAL BOOLEAN Return a Data frame with calculated values, instead of P, i.e., not show if 'Fail'.

Value

It returns a VECTOR c() with x,y, && fxy values referents to m iterations.

x

FLOAT

y

FLOAT

fxy

FLOAT

Or then if

VECTOR=1

DATA FRAME Iterations values, where i is equal to line row

Note

Pseudocode (p. 295)

Author: Frederico Ferreira Filho

Title: Algoritmos Numéricos 2ª

Author(s)

@ppcamp

Examples

1
2
odeEuler(func='x-2*y+1',a=0,b=1,y0=1,m=10, VERBOSE=1)
odeEuler(func='y-x^2+1',a=0,b=2,y0=0.5,m=10,VERBOSE=1)

ppcamp/r-edo-solver documentation built on Dec. 30, 2021, 12:19 a.m.