矩阵的秩

在MATLAB中,用函数rank可以求矩阵的秩。

在命令窗口中输入

code.matlab
>> a=[1 2 0;2 5 -1;4 10 -1];
>> b=rank(a)
b =
    3