How to check that two column vectors are multiple of each other?
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Mohammad Ezzad Hamdan
il 18 Mag 2018
Risposto: Star Strider
il 18 Mag 2018
Example [1;2;3] and [2;4;6]. Are there any specific functions i can use?
0 Commenti
Risposta accettata
Star Strider
il 18 Mag 2018
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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!