Hey guys,
I'm trying to create my own median filter without having to use the medfilt function in Matlab. I need to:
loop through matrix entries from 1-1000(for instance)
I need it to grab entries 1-5 and store the values in an array or something
I need it to then calculate the median of those five entries and store them in a new matrix in the first slot.
Then it needs to go back and grab entries 2-6, store them in the array, calculate the median and place the answer in the new matrix in the second slot and so on.
My only problem really is I don't know how to create a temporary array to hold the five values(that I need to calculate the median of).
Any help is greatly appreciated.
I'm trying to create my own median filter without having to use the medfilt function in Matlab. I need to:
loop through matrix entries from 1-1000(for instance)
I need it to grab entries 1-5 and store the values in an array or something
I need it to then calculate the median of those five entries and store them in a new matrix in the first slot.
Then it needs to go back and grab entries 2-6, store them in the array, calculate the median and place the answer in the new matrix in the second slot and so on.
My only problem really is I don't know how to create a temporary array to hold the five values(that I need to calculate the median of).
Any help is greatly appreciated.