필터 지우기
필터 지우기

How to eliminate zeros from array

조회 수: 1 (최근 30일)
Sarumathi C
Sarumathi C 2018년 3월 14일
편집: Birdman 2018년 3월 14일
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
Jos (10584)
Jos (10584) 2018년 3월 14일
Can you give a an example of these two arrays in working matlab code?
Array1 = ...
Array2 = ...

댓글을 달려면 로그인하십시오.

답변 (1개)

Jos (10584)
Jos (10584) 2018년 3월 14일
a(~logical(a)) = []
  댓글 수: 5
Jos (10584)
Jos (10584) 2018년 3월 14일
Please use valid matlab notation for the examples ...
Birdman
Birdman 2018년 3월 14일
편집: Birdman 2018년 3월 14일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by