Link:http://output.to/sideway/default.asp?qno=140400005 Elementary Matrix Functions
MatLab: Array Manipulating Functions
Major Reference
Source: MatLab Verson 7.0
Since all types of data in MatLab are stored in the form of arrays, MatLab package provides some elementary
array manipulating functions.
Elementary Array Manipulating Functions
Besides
elementary arithmetic function and common mathematical functions, MatLab package
also provides some basic array manipulating functions for manipulating
matrices and arrays.
-
Array Creation and Concatenation Functions
-
Array Indexing Functions.
-
Array Sizes and Dimensions Functions
-
Array Sorting and Reshaping Functions.
Array Creation and Concatenation Functions
Function |
Description |
accumarray(A,B) |
to construct a
new array by accumulating the elements of an array B according to the
corresponding index specified by the array A in a row vector form with others
are zeros. |
blkdiag(A,B,...) |
to construct a new matrix by placing the specified list of matrices,
A,B,..., diagonally
with others are zeros. |
eye([A,B],C) |
to construct a new matrix by placing one diagonally with others are zeros of
dimension A-by-B and optional class C or a A-by-A identity matrix, If B is not
specified. |
false([A,B,..]) |
to construct a new false array by placing False or logical zeros of dimension
according to the specified the list of dimension A-by-B-by-... or a A-by-A
square matrix, If only one dimension A is specified. False by itself is
short-hand for logical(0) |
freqspace |
|
linspace(a,b,n) |
to construct a new
linearly spaced row vector pf n points with value between and including a and b.
The default number of points is 100 points If n is not
specified. |
logspace(a,b,n) |
to construct a new
logarithmically spaced row vector pf n points with value between and including
decades 10^a and 10^b. The default number of points is 50 points If n is not
specified. And if b is equal to pi, then the value of points becomes between and
including 10^a and pi. |
meshgrid |
|
ndgrid |
|
ones |
|
rand |
|
repmat |
|
true([A,B,..]) |
to construct a new true array by placing True or logical ones of dimension
according to the specified list of dimension A-by-B-by-... or a A-by-A square
matrix, If only one dimension A is specified. True by itself is short-hand for
logical(1) |
zeros |
|
cat |
|
horzcat |
|
vertcat |
|
Examples
1
Array Indexing Functions
Function |
Description |
colon |
|
end |
|
ind2sub |
|
sub2ind |
|
Examples
1
Array Sizes and Dimensions Functions
Function |
Description |
length |
|
ndims |
|
numel |
|
size |
|
height |
|
width |
|
iscolumn |
|
isempty |
|
ismatrix |
|
isrow |
|
isscalar |
|
isvector |
|
Examples
1
Array Sorting and Reshaping Functions.
Function |
Description |
circshift |
|
ctranspose |
|
diag |
|
fliplr |
|
flipud |
|
ipermute |
|
permute |
|
reshape |
|
rot90 |
|
shiftdim |
|
issorted |
|
sort |
|
sortrows |
|
squeeze |
|
transpose |
|
vectorize(a) |
to vectorize an expression a. |
Examples
1
|
APR 2014 | | S | M | T | W | T | F | S | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | | | |
MAR 2012 | | S | M | T | W | T | F | S | | | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
|