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
Differentiation: The derivative of a function y = f(x) can be written as follows or f  '(x) and is defined as the rate of change of the dependent variable y with respe

Creating Customized strings: There are many built-in functions which create customized strings, including blanks, char, and sprintf. We know that the char function can be u

Strings as Vectors: The Strings are considered as vectors of characters-or in another words, a vector in which each and every element is a single character-so numerous vector

Example of Recursive functions: This definition is recursive as a factorial is defined in terms of the other factorial. There are two parts to any recursive definition: the co

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

Example of Minimum and Maximum Value For matrices, the functions min and max operate column wise by the default: >> mat = randint(2,4,[1 20]) mat =    9   10   1

Illustration of Labels and prompts: The program below prompts the user for endpoints (x1, y1) and (x2, y2) of a line segment, and computes the midpoint of the line segment, th

Sorting The Sorting is a process of putting a list in order; either in descending (maximum to minimum), or ascending (minimum to maximum) order. For illustration, here is a li

Standard Deviation The standard deviation is the square root of variance: The built-in function in a MATLAB for the standard deviation is known as std; the standard dev

Types of User-defined Functions: We know how to write a user-defined function, stored in an M-file, which computes and returns one value. This is merely one type of the functi