How can I write the same code without using medfilt1 command?
5 views (last 30 days)
Show older comments
Gokcen YARICI
on 12 Dec 2015
Edited: Gokcen YARICI
on 14 Dec 2015
Ok. I don't know where to start writing this function. Help me please.
Thank you
0 Comments
Accepted Answer
Image Analyst
on 12 Dec 2015
You can use the median() function. Then you just have to put that inside a for loop, which is extremely trivial.
Is this homework? Or do you just not have the Signal Processing Toolbox?
2 Comments
Image Analyst
on 12 Dec 2015
You're welcome - that's what I thought so that's why I didn't just do it outright for you. Thanks for accepting. If you have any trouble or error messages, then attach your code and we'll see how to fix it. But it's basically
for k = .....
filteredSignal(k) = med(...........
end
subplot(2,1,1);
plot(originalSignal,......
subplot(2,1,2);
plot(filteredSignal,......
More Answers (1)
Jan
on 12 Dec 2015
Please take the time to post, what you have tried so far. Note that you will get many working medfilt1 replacement codes, if you ask your favorite internet search engine.
0 Comments
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!