Borrar filtros
Borrar filtros

How to eliminate zeros from array

1 visualización (últimos 30 días)
Sarumathi C
Sarumathi C el 14 de Mzo. de 2018
Editada: Birdman el 14 de Mzo. de 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 comentario
Jos (10584)
Jos (10584) el 14 de Mzo. de 2018
Can you give a an example of these two arrays in working matlab code?
Array1 = ...
Array2 = ...

Iniciar sesión para comentar.

Respuestas (1)

Jos (10584)
Jos (10584) el 14 de Mzo. de 2018
a(~logical(a)) = []
  5 comentarios
Jos (10584)
Jos (10584) el 14 de Mzo. de 2018
Please use valid matlab notation for the examples ...
Birdman
Birdman el 14 de Mzo. de 2018
Editada: Birdman el 14 de Mzo. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by