Given a vector of elements, determine if each element is an integer and return true or false accordingly.
Thanks for the corrections. Test cases are corrected now.
great (and one more thing, on test 6 I believe y_correct should have 5 elements instead of 4)
Again agree with Alonso: Test 6 is not correct.
My apologies. Test case 6 is corrected now.
vectors can only contain values with the same "data type", so tests 4&5 are not really working as expected (e.g. all values in x for test 4 are being converted to uint8)...
Which doors are open?
Insert zeros into vector
select the primes of a vector
Create an n-by-n null matrix and fill with ones certain positions
Find the index of nth maximum of a row vector of real numbers
Power of n ?
Check if equal
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office