Check whether the element of given row vector is a square or cube of consecutive numbers.
For example
Input x=[4 27 16 25 36 343]
Output y=true
Hence all elements are the square/cube values of number 2 3 4 5 6 7.
But if x=[36 49 121 81] then y=false. Because square/cube value for 8 is missing.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers20
Suggested Problems
-
2824 Solvers
-
Generate N equally spaced intervals between -L and L
954 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
14238 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1283 Solvers
-
93 Solvers
More from this Author3
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Test suite update with an additional case.