Question: matlab help A M-th order median filter runs through the signal x element by element, replacing each element x(n) (n-1:length(x) with the median value of

matlab help
A M-th order median filter runs through the signal x element by element, replacing each element x(n) (n-1:length(x) with the median value of its M neighboring elements from x(n- M-1 M ) tox(n+M 1) For simplicity, we only use odd numbers for M. The boundary pixels M-1 are going to be repeated for times to obtain enough elements. For example, a median filter with M-3 will be applied to the following simple signal stored in vector x: x=[2 8063] As the results, the median filtered output signal y will be: y[1] Median[2 2 80] 2 y[2] Median[2 80 6]- Median[26 801 6 y[3] Median(80 6 3] _ Median(3 6 801-6 y[4] = Median(6 3 31-Median[3 3 61-3 Write a MATLAB function to implement the median filter. This function should take two input arguments, one is the vector to be filtered. and the other one is an odd integer M as the order of the filter. It should output the resulting median-filtered vector. Run and test your function with the above x and M-3. attach your results
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
