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
User input in the while loop: Here is an illustration of running this script: >> readonenum Enter a positive number: -5 Invalid! Enter a positive number: -2.2

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

User-defined functions: Therefore, although many functions compute and return values, some do not. A few functions rather merely accomplish a task. Regardless of what type of

Changing Dimensions: In addition to transpose operator, the MATLAB has some built-in functions which change the dimensions or configuration of matrices, involving fliplr, resh

Writing and Reading Spreadsheet Files: The MATLAB functions xlswrite & xlsread will write to and read from the spreadsheet files which have the extension .xls. For illustratio

Strcat function - Concatenation : The strcat function, though, will eliminate the trailing blanks from strings before concatenating. Note that in these illustrations, the trail

Minimum and Maximum Value The MATLAB has built-in functions for numerous statistics. For illustration, min and max to find the minimum or maximum value in a data set. >> x

Illustration of a recursive function: illustration is of a recursive function which does not return anything, but simply prints. The below function prtwords receives a sentenc

Illustration of Minimum and Maximum Value Both of these functions also return the index of the minimum or maximum value; when there is more than one occurrence, it returns the

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