how to sort a matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
hi I have a big matrix A = [k x 1] where k is around 10,000 and k ranges from, say, a to b
i need get a matrix B from A for all the values of k ranging from a to c, where a < c < b;
I've tried everything by can't figure out how to do it.
Thanks,
B.
0 Kommentare
Antworten (2)
Andrei Bobrov
am 21 Feb. 2012
eg
a = 12
b = 125
A = randi([a b],20,1)
c = (a + b)/2;
B = A(A < c)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Shifting and Sorting 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!