Error Function

Description

Error Function

Usage

1
2
3
4

Arguments

x

Details

Uses pnorm to calculate the error function. erfinv returns the inverse of the erf function.

Value

error function

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

See Also

philpotts.erf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
j = seq(from=0, to=5.5, by=0.01)
 y = erf(j)   
phil = philpotts.erf(j)

 plot(j,y)
points( j, phil, pch=3, col='red'  )


#### plot the difference
plot(j, y-phil)
lines(j, y-phil)


#####  inverse of erf function:

 j = seq(from=0, to=5.5, by=0.1)
 y = erf(j)

for(i in 1:length(j))
   {

     z = erfinv(y[i])
     print(paste(i, y[i], j[i], z, sep=" "))
   }

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.