I created this variable in the workspace:
z=
0.000894000000000000
-0.000929000000000000
0.00101500000000000
0.000747000000000000
0.00103900000000000
0.000888000000000000
0.000828000000000000
0.000737000000000000
0.000858000000000000
-0.000723000000000000
0.000874000000000000
I would like to write code that will replace the negative ones with the average of the numbers found directly above and below this number.
Try this:
but this is not fully correct. What should happen in the following cases: