eliminating noise/spikes
Posted
by
tgv
on Stack Overflow
See other posts from Stack Overflow
or by tgv
Published on 2011-11-27T08:14:52Z
Indexed on
2011/11/27
9:50 UTC
Read the original article
Hit count: 136
matlab
I have a measurement data with similar positive and negative values which should be like:
ReqData=[0 0 -2 -2 -2 -2 -2 -2 0 0 0 -2 -2 -2 -2 0 0 2 2 2 2 2 2 0 0 2 2 2 2 2 0 0 2 2 2 2 2 0 0 2 2 2 0 0]'
However, there are some measurement noises in the data - so the real data is like this:
RealData=[0 0 -2 -2 -2 -2 -2 -2 0 0 0 -2 -2 -2 -2 0 0 2 2 2 2 -4 -1 0 0 2 2 2 2 -7 0 0 2 2 2 2 -1 0 0 2 2 2 0 0]'
- How do I remove the end noise from the
RealData
and convert it intoReqData
using Matlab? - How do I find the start and stop indexes of each set of positive or negative data and split them using Matlab? For instance,
ansPositive = [3,8, 12, 15]'
andansNegative = [18, 23, 26, 30, 33, 37, 40, 42]'
.
© Stack Overflow or respective owner