How to eliminate rows??
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Triveni
le 20 Fév 2016
Réponse apportée : Walter Roberson
le 20 Fév 2016
a = [30 30 30 10 10 0 0 10 20 20];
a1 = unique(a);
a2 = perms([a1,fliplr(a1)]);
p1 = [a2 , fliplr(a2),a2 , fliplr(a2), a2];
p2 = p1 (:, 1:length(a));
ppp = unique(p2,'rows');
pp = permute(ppp, [3 2 1]);
if unique(a) is less than 2 times then i have to eliminate rows in ppp or pp.
0 commentaires
Réponse acceptée
Walter Roberson
le 20 Fév 2016
threshold = 2;
ppp( sum(ismember(ppp, a1), 2) < threshold, :) = [];
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Numeric Types dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!