How to eliminate zeros from array
이전 댓글 표시
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)
2018년 3월 14일
Can you give a an example of these two arrays in working matlab code?
Array1 = ...
Array2 = ...
답변 (1개)
Jos (10584)
2018년 3월 14일
a(~logical(a)) = []
댓글 수: 5
Sarumathi C
2018년 3월 14일
Jos (10584)
2018년 3월 14일
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
2018년 3월 14일
Jos (10584)
2018년 3월 14일
Please use valid matlab notation for the examples ...
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!