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
Strings as matrix: The matrix can be generated, that consists of strings in each row. Therefore, essentially it is created as a column vector of strings, but the final result

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

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

Labels and Prompts: The script loads all the numbers from file into a row vector. It then splits the vector; it stores the initial element that is the experiment number in a v

Write a MATLAB function [d1, u1, l1, c1, r1] = NaiveGaussArrow(d, u, l, c, r) that takes as input the 5 vectors de ned above representing A. This function performs Naive Gauss redu

Illustration of Spreadsheet Files: This reads the numbers in a double vector variable nums and the text in a cell array txt (the xlsread function forever returns the numbers f

Print an imaginary number: To print an imaginary number, the function disp will show both parts automatically: >> disp(z1)    4.0000 + 2.0000i The function fprint

sprintf function: The sprintf function works precisely like the fprintf function, but rather than printing it generates a string. Here are some illustrations in which the outp

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

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