Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What's the difference between. * and * in matlab?

Shulou Source: shulou.com Published: 2022-06-02 17:26:56 09月29日 Update

This article mainly introduces the matlab. * and * what is the difference, has a certain reference value, friends in need can refer to. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

In the operation between matrices, the meanings of ". *" and "*" are different: "*" is matrix multiplication, and the two matrices must satisfy that the number of columns of the left matrix is equal to the number of rows of the right matrix; ". *" is the point multiplication operation, which refers to the multiplication of the corresponding elements in the two matrices.

The difference between "*" and "*":

When performing operations between numbers, there is no difference between ". *" and "*". They both represent ordinary multiplication operations. Example: M = 2, m = 3, m, m,

The meaning of ". *" and "*" is different in the operation between matrices. Suppose that the matrix an is multiplied by the matrix b, and that the elements in matrix an are multiplied by the elements in the matrix b by position, and the result will be regarded as the elements in the same position in the new matrix.

* is a matrix multiplication. If An is a massively n-dimensional matrix and B is an n-dimensional matrix, then AbeliB is a massively p-dimensional matrix.

. * Point multiplication, which refers to the multiplication of the corresponding elements in two matrices. Two matrices are required to have the same dimension.

A special symbol is used in MATLAB to distinguish matrix operations from array operations. When you need to distinguish between the two, place the dot in front of the symbol to indicate that this is an array operation (for example,. *). The line surface gives some common array and matrix operations.

Array addition: array B, array addition and matrix addition are the same.

Array subtraction: a-subtraction B, array subtraction is the same as matrix subtraction.

Array multiplication: the elements of An and B are multiplied one by one. There must be the same shape between the two arrays, or one of them is a scalar.

Matrix multiplication: Matrix multiplication of An and B. the number of columns in A must be the same as the number of rows in B.

Right division of the array: the elements of An and B are divided one by one: there must be the same shape between the two arrays, or one of them is a scalar.

Array left division: elements of A.\ BMagneA and B are divided one by one: there must be the same shape between the two arrays, or one of them is a scalar.

Matrix right division: A*inv B matrix division is equivalent to inv (B), which is the inverse of B.

Matrix left division: a\ B matrix division, which is equivalent to inv (B) * A, and inv (A) is the inverse of A.

Array exponential operation: A. ^ B, elements in AB perform the following operations one by one: a (iMaginj) ^ B (iMaginj), A (iMaginj) / B (iMaginj) must have the same shape between two arrays, or one of them is a scalar.

Thank you for reading this article carefully. I hope the editor will share the difference between * and * in matlab. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

Tags: Matrix array operation same element multiplication between division two scalar different subtraction addition article position meaning symbol equivalent general special Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia Microsoft Shulou Tech Info OPPO Reno