crossing_zero_up: Zero crossing of a periodical function

Description Usage Arguments Value Examples

View source: R/roots.R

Description

Zero crossing of a periodical function

Usage

1
2
crossing_zero_up(fnc, from, to, period, search_interval = 0.005,
  incrx = 0.01, silent = FALSE, trace = TRUE)

Arguments

fnc

Function

from

Initial value of the interval to be searched

to

Final value of the interval to be searched

period

Period of the function

search_interval

Search interval for each root

incrx

increment in x to calculate the derivative used to check the slope in the point of crossing

silent

If true a text progress bar is shown

trace

If true prints a trace

Value

vector of roots of the function

Examples

1
2
3
4
fnc<-function(x) apparent_equatorial_position(x,"sun")$declination
from <- str2jd("2014-03-08")
to <- str2jd("2018-03-08")
crossing_zero_up(fnc,from,to,period=365.25,search_interval=10)

Susarro/arqastwb documentation built on May 21, 2019, 10:28 a.m.