フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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

1 回表示 (過去 30 日間)
Vinit
Vinit 2014 年 8 月 6 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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;.........]
  2 件のコメント
Star Strider
Star Strider 2014 年 8 月 6 日
What do you want your resulting data matrix to look like?
Vinit
Vinit 2014 年 8 月 7 日
0 0 0;1 2 4;1 2 3;1 2 1;1 2 4.

回答 (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