How to eliminate zeros from array
Mostrar comentarios más antiguos
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)
el 14 de Mzo. de 2018
Can you give a an example of these two arrays in working matlab code?
Array1 = ...
Array2 = ...
Respuestas (1)
Jos (10584)
el 14 de Mzo. de 2018
a(~logical(a)) = []
5 comentarios
Sarumathi C
el 14 de Mzo. de 2018
Jos (10584)
el 14 de Mzo. de 2018
You cannot simply eliminate elements in a regular array without changing the shape, you should replace them by something else.
What do you exactly mean by " find difference between two rows " ?
Sarumathi C
el 14 de Mzo. de 2018
Jos (10584)
el 14 de Mzo. de 2018
Please use valid matlab notation for the examples ...
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!