필터 지우기
필터 지우기

How to delete repeating value in a row ?

조회 수: 3 (최근 30일)
omran alshalabi
omran alshalabi 2022년 8월 28일
댓글: omran alshalabi 2022년 8월 28일
code: from a = [1 2 2 4 4 2 2 1 1 4 4 ]
become b = [1 2 4 2 1 4]

채택된 답변

Bruno Luong
Bruno Luong 2022년 8월 28일
a = [1 2 2 4 4 2 2 1 1 4 4 ]
a = 1×11
1 2 2 4 4 2 2 1 1 4 4
b = a([true diff(a)~=0])
b = 1×6
1 2 4 2 1 4
  댓글 수: 1
omran alshalabi
omran alshalabi 2022년 8월 28일
Thank you very much mr. Bruno Luong for your fast response.
It is function very good.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Vector Fields에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by