how to check symmetric for vector or array with 1 dimension

15 Ansichten (letzte 30 Tage)
Dear all,
I have an array and do sum modifi ( mutation) , I want to check before do mutation if they symmetric or not ?
ex: A=[ 1 2 1 ] , after mutation A=[1 2 1] . ---> if this case happen I want to know before I do mutation
thank you .

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 12 Feb. 2019
isequal(A(:),flip(A(:)));

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by