only write a function gives you an outputs as expls:
input: x=2 ------->>> Output: Y=1
input: x=100 ------->>> Output: Y=[ 1 2 4 6 10 12 16 18 22 28 30 36 40 42 46 52 58 60 66 70 72 78 82 88 96]
Hint: here we use the same function used in the series of "Find my secret function".
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers27
Suggested Problems
-
Find the sum of all the numbers of the input vector
54754 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
560 Solvers
-
Set the array elements whose value is 13 to 0
1446 Solvers
-
Golomb's self-describing sequence (based on Euler 341)
190 Solvers
-
Return fibonacci sequence do not use loop and condition
869 Solvers
More from this Author14
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Hello, Said BOUREZG. I suggest that in the fourth case of your Test Suite it would be better to check using "isempty". As written, the Test Suite only accepts 0×0 sized results, and rejects empty 0×1 or 1×0 sized results. —DIV