Cosine
Cosine
¶
Bases: Term
Extended term that represents the cosine membership function.
Equation
\(\mu(x) = \begin{cases} \dfrac{h}{2} \left(1 + \cos\left(\dfrac{2.0}{w}\pi(x-c)\right)\right) & \mbox{if } c - \dfrac{w}{2} \le x \le c + \dfrac{w}{2} \cr 0 & \mbox{otherwise} \end{cases}\)
where
- \(h\): height of the Term
- \(c\): center of the Cosine
- \(w\): width of the Cosine
Attributes¶
Functions¶
__init__
¶
configure
¶
configure(parameters: str) -> None
Configure the term with the parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameters |
str
|
|
required |
membership
¶
Compute the membership function value of \(x\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Scalar
|
scalar |
required |
Returns:
Type | Description |
---|---|
Scalar
|
\(\mu(x) = \begin{cases} \dfrac{h}{2} \left(1 + \cos\left(\dfrac{2.0}{w}\pi(x-c)\right)\right) & \mbox{if } c - \dfrac{w}{2} \le x \le c + \dfrac{w}{2} \cr 0 & \mbox{otherwise} \end{cases}\) |