Comparing vectors of different size
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ben
am 18 Jun. 2014
Beantwortet: Andrei Bobrov
am 18 Jun. 2014
How do I compare two vectors of different size? I want to compare them using the "greater than or equal to operator" or "less than operator". Here's what I'm trying to vectorize:
A = [1 2 3 4 5]; B = [1 2 3]; for i = 1:length(B) C = find(A >= B(i)); end % C = [3 4 5]
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!