Matrices and Arrays

Array creation, combining, reshaping, rearranging, and indexing

Matrices and arrays are the fundamental representation of information and data in MATLAB® . You can create common arrays and grids, combine existing arrays, manipulate an array's shape and content, and use indexing to access array elements. For an overview of matrix and array manipulation, watch Working with Arrays.

Funciones

expandir todo

zerosCrear un array de ceros
onesCrear un arreglo de unos
randNúmeros aleatorios distribuidos uniformemente
trueLogical 1 (true)
falseLogical 0 (false)
eyeIdentity matrix
diagCrear matriz diagonal o obtener elementos diagonales de Matrix
blkdiagConstruct block diagonal matrix from input arguments
catConcatenate arrays along specified dimension
horzcatConcatenate arrays horizontally
vertcatConcatenate arrays vertically
repelemRepeat copies of array elements
repmatRepetir copias de array
linspaceGenerar un vector espaciado linealmente
logspaceGenerate logarithmically spaced vector
freqspaceFrequency spacing for frequency response
meshgridrejillas 2-d y 3-d
ndgridRectangular grid in N-D space
lengthLongitud de la dimensión de matriz más grande
sizeTamaño de un array
ndimsNumber of array dimensions
numelNúmero de elementos de matriz
isscalarDetermine whether input is scalar
issortedDetermine if array is sorted
issortedrowsDetermine if matrix or table rows are sorted
isvectorDetermine whether input is vector
ismatrixDetermine whether input is matrix
isrowDetermine whether input is row vector
iscolumnDetermine whether input is column vector
isemptyDetermine whether array is empty
sortOrdenar elementos de un array
sortrowsSort rows of matrix or table
flipFlip order of elements
fliplrFlip array de izquierda a derecha
flipudFlip array up to down
rot90Rotate array 90 degrees
transposeTransponer un vector o una matriz
ctransposeComplex conjugate transpose
permuteRearrange dimensions of N-D array
ipermuteInverse permute dimensions of N-D array
circshiftShift array circularly
shiftdimShift dimensions
reshapeReformular un array
squeezeRemove singleton dimensions
colonCreación de vectores, subíndices de arrays e iteración de for-loop
endTerminate block of code, or indicate last array index
ind2subSubscripts from linear index
sub2indConvert subscripts to linear indices

Temas

행렬을 생성하고 결합(Concatenate)하기

행렬을 새로 만들거나 여러 행렬에서 하나의 행렬을 생성합니다.

Removing Rows or Columns from a Matrix

Remove matrix rows or columns.

행렬의 크기와 형태 변경(reshape)하기

기존 행렬의 요소의 크기, 형태, 또는 배열을 변경합니다.

다차원 배열

3차원 이상을 갖는 배열을 만들고 이를 사용하여 작업합니다.

행렬 인덱싱

행 인덱싱과 열 인덱싱 방법을 사용하여 행렬의 요소에 액세스하거나 행렬의 요소에 값을 대입합니다.