Compare two vectors in matlab n*m
Mostra commenti meno recenti
A=[1 2 3 4 5 6 7 8 9 10]
B=[4]
I want to compare these two vectors one by one. I want MATLAB to write as a result of it. for example,
with A(1)(1 here) If 1=B(1) the result should be 1/2, and if A(n)<B(1) the result should be 1, and A(n)>B(1) = 0.
It should compare all elements one by one and output its index in a new vector.
Risposta accettata
Più risposte (1)
Categorie
Scopri di più su Mathematics in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!