How to flip a matrix vertically in Matlab and Octave
To flip a matrix vertically in Matlab and Octave use the function flipud.
The m parameter is the name of the matrix to flip.
Define a matrix 2x2
It is a square matrix.
The first row contains the elements 1 and 2.
The second row contains the elements 3 and 4.
Flip the matrix vertically using the function flipud()
The output result is a new matrix
The first row of the matrix became the second row. And viceversa.
Report us an error or send a suggestion to improve this page