linearly independent or linearly dependent.

210 ビュー (過去 30 日間)
mohammed alnatsheh
mohammed alnatsheh 2021 年 5 月 7 日
コメント済み: Jonas 2021 年 5 月 9 日
how can i determine if vector v is a linear combination of the members of the S by using matlab ?
S = {(1,2,-1),(2,-1,0),(-1,8,-3)}
v = (0,5,-2)

回答 (2 件)

Matt J
Matt J 2021 年 5 月 9 日
編集済み: Matt J 2021 年 5 月 9 日
If [S,v] and S have the same rank, then the column vector v must be a linear combination of the columns of the matrix S.Testing this in your example,
S = [1,2,-1 ; 2,-1,0 ; -1,8,-3].' ;
v = [0,5,-2].';
isDependent = rank([S,v])==rank(S)
isDependent = logical
1
  1 件のコメント
Jonas
Jonas 2021 年 5 月 9 日
i like that solution, nice and clean!

サインインしてコメントする。


Jonas
Jonas 2021 年 5 月 8 日
編集済み: Jonas 2021 年 5 月 8 日
you could use something like
syms a b c; [sola,solb,solc]=solve(S{1}*a+S{2}*b+S{3}*c==v,a,b,c)

カテゴリ

Help Center および File ExchangeNumber Theory についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by