필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Find The zeros in my data ... and then add the value before the zero to the rest untill finding another zero.

조회 수: 1 (최근 30일)
I have to find the zeros in my data and then add the value before the zero to the rest untill finding another zero and do the same for the rest of the data until there is no more zeros execpt the one at first so that when i plot the data it plots in a single line.
For example my data looks like this [0 0 0;1 2 4;1 2 3;0 2 0; 1 0 3;.........]

답변 (1개)

dpb
dpb 2014년 8월 6일
Check out John's inpaint_nans submission--of course, you'd first convert the 0's to NaN excepting for the first...

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by