Help with removing duplicate sub-elements....
이전 댓글 표시
Hi, I have a vector a1 and want to get an output a2. Basically, i should identify the starting index of numbers, keep the first value and replace the repeating elements as NaN. I have no idea how to start since i am new to Matlab. Can someone please help?
a1=[-2 -2 -2 -2 NaN NaN NaN -3 -3 -3 -3 NaN NaN -2 -2 -2 NaN -3 -3 NaN NaN 1 1 1 1 NaN NaN 4 4 4 NaN NaN 3 3 3 NaN];
a2=[-2 NaN NaN NaN NaN NaN NaN -3 NaN NaN NaN NaN NaN -2 NaN NaN NaN -3 NaN NaN NaN 1 NaN NaN NaN 4 NaN NaN NaN NaN 3 NaN NaN NaN];
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Correlation and Convolution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!