Effacer les filtres
Effacer les filtres

How to create a vector of all elements in another vector that meet a certain condition?

4 vues (au cours des 30 derniers jours)
I have a vector, A, of 1000+ data points, and I want to create a new vector, A_pos, that contains only the positive values for that vector.
How can I do this?

Réponses (1)

Thorsten
Thorsten le 4 Avr 2017
A_pos = A(A>0);

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by