How to check the MATRIX is flip or not
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Trang Hu Jia
am 4 Jan. 2022
Kommentiert: Trang Hu Jia
am 5 Jan. 2022
Hello everyone,
Suppose I have matrix A as shown below,
A = [1 2 3 4 3 2 1
2 3 4 5 4 3 2
2 3 4 5 4 3 2
1 2 3 4 3 2 1]
The first and second row are flipped into third and fourth row at the center in x-direction and I can checked it easily.
Now, If I have a large size of matrix, i.e. [500 x 200].
Do we have any way to check this large matrix is flipped (in x-direction) ?
I really need your help.
Thanks in advance.
1 Kommentar
Rik
am 4 Jan. 2022
What exactly do you mean by flipped? Do you mean the first row is flipped left to right and appears elsewhere in the array?
Akzeptierte Antwort
DGM
am 4 Jan. 2022
It's unclear what you're actually asking for, but I'm going to guess it's one of the two:
A = [1 2 3 4 3 2 1
2 3 4 5 4 3 2
2 3 4 5 4 3 2
1 2 3 4 3 2 1];
ishsymmetric = isequal(A,flip(A,2))
isvsymmetric = isequal(A,flip(A,1))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!