Problem 60521. Implement the signum function
The signum function is a common mathematical function, which has the following definition :
If x => 0, its value is 1, if x < 0 its value is -1.
Given the value of x, implement the signum function.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers11
Suggested Problems
-
300 Solvers
-
Back to basics 19 - character types
265 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
542 Solvers
-
190 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
12109 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!