How to check that two column vectors are multiple of each other?

5 ビュー (過去 30 日間)
Mohammad Ezzad Hamdan
Mohammad Ezzad Hamdan 2018 年 5 月 18 日
回答済み: Star Strider 2018 年 5 月 18 日
Example [1;2;3] and [2;4;6]. Are there any specific functions i can use?

採用された回答

Star Strider
Star Strider 2018 年 5 月 18 日
One option is to concatenate them and then use the rank function to check to see if they are linearly dependent.
For this particular problem, this works:
a = [1;2;3];
b = [2;4;6];
c = [a b];
LinDep = rank(c) < min(size(c))
Here, if ‘LinDep’ (‘linearly dependent’) is true (or 1), at least two columns or rows are multiples of each other.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by