Filter löschen
Filter löschen

How to eliminate zeros from array

1 Ansicht (letzte 30 Tage)
Sarumathi C
Sarumathi C am 14 Mär. 2018
Bearbeitet: Birdman am 14 Mär. 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 Kommentar
Jos (10584)
Jos (10584) am 14 Mär. 2018
Can you give a an example of these two arrays in working matlab code?
Array1 = ...
Array2 = ...

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jos (10584)
Jos (10584) am 14 Mär. 2018
a(~logical(a)) = []
  5 Kommentare
Jos (10584)
Jos (10584) am 14 Mär. 2018
Please use valid matlab notation for the examples ...
Birdman
Birdman am 14 Mär. 2018
Bearbeitet: Birdman am 14 Mär. 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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by