Determine whether the vector is symmetric or not (vector could be even or odd in length).
x = [1 2 3 3 2 1] is symmetric
x = [1 2 3 4 3 2 1] is symmetric as well!
x = [-1 -2 -3 3 2 1] is not symmetric
Case #3 is not symmetric...please check.
I fixed the wording.
Why the vector from "Test Suite" "Test 3" is symmetric?
x = [-1 0 0 1];
y_correct = 1; %% WHY 1?
I updated test case #3.
Include a test case where first and last are same, but ones in middle aren't (say [1 2 4 3 5 2 1])
I need to learn more.
What if you update the test #3 in test suite?
Extract leading non-zero digit
matrix of natural number
Find the index of n in magic(n)
Matlab Basics II - Minimum
Change the sign of even index entries of the reversed vector
Duplicate a character
Remove entire row and column in the matrix containing the input values
Insert zeros into vector
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