Simple matrix division in Matlab

In summary, matrix division in Matlab is the process of dividing one matrix by another to obtain a new matrix as the result. It is represented by the backslash operator (\) or the function "mrdivide". Regular division involves dividing two numbers, while matrix division involves dividing two matrices. In matrix division, the dimensions of the matrices must be compatible, and the result is a new matrix, whereas in regular division, the result is a single number. There are two types of matrix division in Matlab: left-division and right-division. Left-division (A\B) calculates the solution to the equation A*x = B, while right-division (A/B) calculates the solution to the equation x*B = A. The outcome of
  • #1
nb89
37
0
I have 2 matrices a=[1 2 3 4] and b=[1 4 9 16], i want to divide each term in matrix b by the same term in matrix a, in other words i want to end up with a matrix of [1 2 3 4].

Ive tried doing b/a, which clearly is wrong!

Thanks for any help
 
Physics news on Phys.org
  • #3
Dr Transport said:
b./a yields an element by element divide...

thank you, i knew it was something simple :D
 

What is matrix division in Matlab?

Matrix division in Matlab is the process of dividing one matrix by another to obtain a new matrix as the result. It is represented by the backslash operator (\) or the function "mrdivide".

How is matrix division different from regular division?

Regular division involves dividing two numbers, while matrix division involves dividing two matrices. In matrix division, the dimensions of the matrices must be compatible, and the result is a new matrix, whereas in regular division, the result is a single number.

What are the different types of matrix division in Matlab?

There are two types of matrix division in Matlab: left-division and right-division. Left-division (A\B) calculates the solution to the equation A*x = B, while right-division (A/B) calculates the solution to the equation x*B = A.

What are the possible outcomes of matrix division in Matlab?

The outcome of matrix division in Matlab can be a new matrix, an error if the dimensions are not compatible, or "NaN" (not a number) if the result is undefined.

How can I perform matrix division in Matlab?

To perform matrix division in Matlab, you can use the backslash operator (\) or the function "mrdivide". Make sure to use the correct type of division (left or right) and that the dimensions of the matrices are compatible.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
32
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
117
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
902
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
Back
Top