How to check if m n-sized vectors are linearly independent?

前端 未结 8 2457
栀梦
栀梦 2020-12-15 05:47

Disclaimer
This is not strictly a programming question, but most programmers soon or later have to deal with math (especially algebra), so I think tha

8条回答
  •  旧巷少年郎
    2020-12-15 06:03

    I have been working on this problem these days.

    Previously, I have found some algorithms regarding Gaussian or Gaussian-Jordan elimination, but most of those algorithms only apply to square matrix, not general matrix.

    To apply for general matrix, one of the best answers might be this: http://rosettacode.org/wiki/Reduced_row_echelon_form#MATLAB

    You can find both pseudo-code and source code in various languages. As for me, I transformed the Python source code to C++, causes the C++ code provided in the above link is somehow complex and inappropriate to implement in my simulation.

    Hope this will help you, and good luck ^^

提交回复
热议问题