The problem title and description have been improved.
What should the behavior be when a certain value occurs three times or more in vector A? For example, when A = [2 5 3 4 2 1 3 2] (which is the same as the A in the problem description, but with another '2' added to the end), should matrix B list [5 4 2 1 3] before [5 3 4 1 2], or after?
if x is not continuous, the result will be not true
Find the longest sequence of 1's in a binary sequence.
Test if a Number is a Palindrome without using any String Operations
Snakes on a plane
Make a random, non-repeating vector.
Create an 'arrow-head" matrix
Create a fixed format text output
Extract part elements of matrix into one new matrix
Find the treasures in MATLAB Central and discover how the community can help you!
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