Effacer les filtres
Effacer les filtres

How to eliminate zeros from array

1 vue (au cours des 30 derniers jours)
Sarumathi C
Sarumathi C le 14 Mar 2018
Modifié(e) : Birdman le 14 Mar 2018
e.g I want to make this:
1,1,1,1,0,0 1,1,0,0,0,0 1,0,0,0,0,0 1,1,1,1,1,0 into this:
1,1,1,1 1,1 1 1,1,1,1,1
  1 commentaire
Jos (10584)
Jos (10584) le 14 Mar 2018
Can you give a an example of these two arrays in working matlab code?
Array1 = ...
Array2 = ...

Connectez-vous pour commenter.

Réponses (1)

Jos (10584)
Jos (10584) le 14 Mar 2018
a(~logical(a)) = []
  5 commentaires
Jos (10584)
Jos (10584) le 14 Mar 2018
Please use valid matlab notation for the examples ...
Birdman
Birdman le 14 Mar 2018
Modifié(e) : Birdman le 14 Mar 2018
And maybe this should be a new question since it is hard to pay attention to this between comments, also you are off the topic of the question.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with MATLAB 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!

Translated by