View source: R/Simulate_Data.R
sigmoid | R Documentation |
Compute a sigmoid function.
sigmoid(x, asym = 1, v = 1)
x |
a numerical vector, time points. |
asym |
a numerical value (optional), the asymptote of the sigmoid function. |
v |
a numerical value (optional), related to the slope at the origin. |
see the function sim_x
.
a numerical vector.
## Test 1 :
x <- seq(-7,7,0.1)
y <- sigmoid(x)
plot(x,y,type="l",main="Sigmoid function")
## Test 2 :
x <- seq(-7,7,0.1)
y <- sigmoid(x)
y2 <- sigmoid(x,asym=0.5)
y3 <- sigmoid(x,v = 5)
plot(x,y,type="l",main="Other sigmoid functions")
lines(x,y2,col=2)
lines(x,y3,col=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.