Fliplr function - changing dimensions, MATLAB in Mathematics

Fliplr function:

The fliplr function "flips" the matrix from left to right (in another words the left-most column, the first column, become the last column and so on), and the flipud functions flips up to down. Note that in these illustrations mat is unchanged; rather than, the results are stored in the default variable ans each time.

34_Fliplr function.png

The rot90 function rotates the matrix counter clockwise 90 degrees, therefore for illustration the value in the top-right corner becomes rather than the top-left corner and the last column becomes the first row:

>> mat

mat =

14 61  2 94

21 28 75 47

20 20 45 42

>> rot90(mat)

ans =

94   47   42

2    75   45

61   28   20

14   21   20

Posted Date: 10/18/2012 4:32:09 AM | Location : United States







Related Discussions:- Fliplr function - changing dimensions, Assignment Help, Ask Question on Fliplr function - changing dimensions, Get Answer, Expert's Help, Fliplr function - changing dimensions Discussions

Write discussion on Fliplr function - changing dimensions
Your posts are moderated
Related Questions
Illustration of Writing to files: Here is the other illustration in which a matrix is written to a file. At First, an arbitrary 2 × 4 matrix is generated, and then it is writt

Illustration of logical built-in functions: The function find returns the indices of a vector which meet certain criteria. For illustration, to find all the elements in a vect

Polar Form: Any complex number z = a + bi can be thought of as a point (a,b) or vector in the complex plane in which the horizontal axis is the real part of z, and the vertica

Counting in a While Loop: Whenever it is not known ahead of the time how many values will be entered into the script, it is often essential to count the number of values which

Built-in functions for Complex numbers:   We know that in MATLAB both i and j are built-in functions which return √-1 (therefore, they can be thought of as built-in constants).

Built-in function for Differentiation: The MATLAB has a built-in function, diff that returns the differences between consecutive elements in a vector. For illustration, >>

Complex numbers: A complex number is commonly written in the form z = a + bi here a is known as the real part of the number z, b be the imaginary part of z, and i is √-1

Give the formula for a rational function that has a hole at x=7 & vertical asmptote at x=-3/2

Refer the subset of a matrix: It is also possible to refer to the subset of a matrix. For illustration, this refers to the first & second rows, second & third columns: >> m

Using Functions with the Vectors and Matrices: As MATLAB is written to work with the vectors and matrices, the whole vector or matrix can be passed as an argument to the funct