Want to remove 'noise' from a matrix.
Show older comments
I have a single column matrix with values ranging from around -15 to 50, there's around 19000 values and I wish to remove any values below 20 and set them as 0. This is what I currently have to import the data:
input = xlsread('HiG_67.csv','J:J');
Thanks
1 Comment
Stephen23
on 8 Oct 2015
Do not call your variable input as this is the name of a commonly used inbuilt function input. When you shadow the name of an inbuilt function like this it stops the inbuilt function from working.
For this reason never use the names size, length, input, i, j, cat, length, etc. You can use which to check if a name is already used-
Accepted Answer
More Answers (1)
x(x < 20) = 0;
BTW: Please don't call your variable input, it's a Matlab function.
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!