11-05-2017 02:36 AM - edited 11-05-2017 02:55 AM
Hi all!
I'm trying to use median fitler. But I'm not quite sure about how to configure it.
1. Does left rank and left rank mean the number of elements counting from the value at the center? For example, if i have five data points, and if I set the left rank=2 and right rank=2, does median filter.vi give me the 3rd data point(by 3rd data point I mean counting from the smallest value)?
2. The description of median filter.vi says the output, filtered array is the same as the input array. But how does this work? Isn't the point of having a median filter is to drop the undesired data points? Like if I have 5 data points, and I use the medain filter.vi, how can I just get the 3rd biggest value?
3. If I have 100 data points, how will medain filter.vi filter them? From the description, I think it will make the data into group of, let's say, 5, and get the 3rd biggest value from each of these groups, and return these 3rd biggest value, maybe??? Cause if this is the case then the output will only have 20 data points and it's not the same size as the input array
Solved! Go to Solution.
11-05-2017 05:27 AM
1. Does left rank and left rank mean the number of elements counting from the value at the center? For example, if i have five data points, and if I set the left rank=2 and right rank=2, does median filter.vi give me the 3rd data point(by 3rd data point I mean counting from the smallest value)?
Correct, if left and right rank =2, then 5 data points are ordered according to their size and the third value is returned.
2. The description of median filter.vi says the output, filtered array is the same as the input array. But how does this work? Isn't the point of having a median filter is to drop the undesired data points? Like if I have 5 data points, and I use the medain filter.vi, how can I just get the 3rd biggest value?
Wrong, the help file says:
Filtered X is the output array of filtered samples. The size of this array is the same as the input array X.
3. If I have 100 data points, how will medain filter.vi filter them? From the description, I think it will make the data into group of, let's say, 5, and get the 3rd biggest value from each of these groups, and return these 3rd biggest value, maybe??? Cause if this is the case then the output will only have 20 data points and it's not the same size as the input array
Again wrong: The window for creating a subset of data points is shifted one by one. Perhaps an example will make that clearer. Let's stick with left rank=2 and right rank =2.
First set of data contains the element X[-2], X[-1], X[0], X[1], X[2]. The data points X[-2] and X[-1] are set to zero. From these 5 point, the third largest value is returned as X-Filtered[0].
The second set of data contains the element X[-1] ... X[3]. Again since X[-1] doesn't exists, it's set to zero. From these 5 point, the third largest value is returned as X-Filtered[1].
The third set of data contains the element X[0] ... X[4]. From these 5 point, the third largest value is returned as X-Filtered[2].
And so on...
Regards, Jens
11-08-2017 06:24 AM
thanks!