how to check symmetric for vector or array with 1 dimension

조회 수: 15 (최근 30일)
Ghaida Farraj
Ghaida Farraj 2019년 2월 12일
답변: Andrei Bobrov 2019년 2월 12일
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 .

채택된 답변

Andrei Bobrov
Andrei Bobrov 2019년 2월 12일
isequal(A(:),flip(A(:)));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by