Научная статья на тему 'ALGEBRA OF MATRICES IN THE MATLAB SYSTEM'

ALGEBRA OF MATRICES IN THE MATLAB SYSTEM Текст научной статьи по специальности «Медицинские технологии»

CC BY
18
4
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
MATLAB / MATRIX / ARRAYS / VECTORS

Аннотация научной статьи по медицинским технологиям, автор научной работы — Xolmirzayev I., Abdufattohov I.

This article covers ways to enter matrices, arrays, and vectors in MATLAB. There is talk about actions to be performed on them.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «ALGEBRA OF MATRICES IN THE MATLAB SYSTEM»

Xolmirzayev I. teacher Nam.C.E.I. Abdufattohov I. student Nam.C.E.I.

ALGEBRA OF MATRICES IN THE MATLAB SYSTEM

Abstract: This article covers ways to enter matrices, arrays, and vectors in MATLAB. There is talk about actions to be performed on them. Key words: MATLAB, matrix, arrays, vectors.

MATLAB is a special system designed to perform complex calculations on vectors, matrices and arrays. Simple numbers and variables are also treated as a 1x1 matrix in MATLAB. Therefore, uniformity has been achieved in the form and methods of operations on simple numbers and arrays. If necessary, vectors and matrices are converted into arrays and their values are calculated for each element.

There are several ways to enter matrices in MATLAB:

• Full input of the matrix element;

• Load from external files of the matrix;

• Formation through functions;

• generation by m-file.

The following conditions exist for the complete inclusion of a matrix element:

• insert elements with a separate probe;

• lines ";" separate with;

• get the included elements [ ].

Expressions of the form M(i), M(i, j) are used to indicate some elements of a vector or matrix. For example: » M(2,2).

Assigning a value to the element M(i, j) of the matrix is done using the expression M(i, j)=x. For example: if it is necessary to give the value 10 to the element M(2, 2) of the matrix, it is written as follows: » M(2, 2)= 10.

The single-index M(i) expression can be used to refer to the elements of a matrix spanning a single column.

In addition to some elements of matrices and vectors, operations can be performed on all their elements (arrays). For this, a dot is placed in front of the action symbol. For example, the * operator means multiplication of vectors or matrices, while the.* operator means element-by-element multiplication of all elements of an array.

Expressions M*2 and M.*2 where the matrix is multiplied by a scalar are equally strong.

The main characteristics of the matrix include:

• determinant;

• color;

• norm;

• orthonormal basis;

• eigenvalues and vectors.

The necessary functions for calculating the given characteristics of the matrix are listed in the matlab\matfun folder, and the list of these functions is issued using the help matfun command.

The following operations can be performed on matrices:

1. eye(n) is a function to declare an n-dimensional unit square matrix.

2. ones(n,m) is a function to declare a matrix with elements of size n, m equal to 1.

3. zeros(n,m) is a function to declare a matrix with elements of size n, m equal to 0.

4. The diagonal elements of the matrix can be extracted using the diag() function.

5. Using the fliplr() function, the inverse matrix is generated with respect to the diagonal of the matrix.

6. The magic() function produces a square matrix.

7. inv() is a function to find the matrix inverse of the matrix.

8. The row and column of the matrix can be deleted with simple square brackets []. For example: >> X(:,2) = []. In this case, the second column of the matrix is deleted.

9. You can use the sum() standard function to find the sum of matrix column elements.

References:

1. Sayfutdinova D., Kadyrova L.A. Knowledge of Matlab. 2011

2.Kholbekova Z., Kadyrova L.A. Reliable mathematical functions and numerical calculations in the Matlab environment. 2011

3. Kuchkarova N., Kadyrova L.A. Additional applications (tulboxy) Matlab.

i Надоели баннеры? Вы всегда можете отключить рекламу.