x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.
In addition to the weak test suite: The title of the problem says "Sinus function", yet the (incomplete) problem description mentions only "cosine" ??? Furthermore, should abs(cos(-x)) be assigned to y, or to z?
Please improve the test cases. Returning 1 and -1 is complete enough with these sloppy tests.
bad test suite
The test suite is not very rigorous...
272 Solvers
Find out missing number from a vector of 9 elements
207 Solvers
Replace multiples of 5 with NaN
282 Solvers
Relative ratio of "1" in binary number
150 Solvers
Matlab Basics - Convert a row vector to a column vector
300 Solvers