English 中文(简体)
Matlab-Matrix - Rank
  • 时间:2024-11-03

Matlab-Matrix - Rank


Previous Page Next Page  

The rank of the matrix is the number of pnearly independent columns in a matrix. The function rank() helps to return the rank of a given matrix.

Example

Consider following example for the use of rank() function for a matrix −


a = [ 1 2 3; 2 3 4; 1 2 5]
test = rank(a)

Output

The output in MATLAB on execution of the code is as follows −


>> a = [ 1 2 3; 2 3 4; 1 2 5]
test = rank(a)

a =

   1  2  3
   2  3  4
   1  2  5
 
test =

   3
 
>>
Advertisements