how do i remove noise in the first column and the last column in matlab code

1 view (last 30 days)
I am having a problem with removing the noise from a matrix(51*51) in an excel file in the first column and the last column in matlab code, my instructor said that we have to do them individualy from the data that are in the middle of the excel file "in between the first and the last column". i will put a copy of my code which is made of 2 for loops and one if to remove the noise.
for row=1:51
for col=2:50
if InstrumentCMM(row,col)>=InstrumentCMM(row,col-1)*1.5
InstrumentCMM1(row,col)=(InstrumentCMM(row,col-1)+InstrumentCMM(row,col+1))/2;
end
end
end
  1 Comment
dpb
dpb on 28 Jul 2019
Well, you'll have to decide what you should use for the first and last columns since there isn't one on either side as there is for the interior columns.
That's just a design choice; we don't have any information from which to judge...how are the columns related or are they? Why is the average of the two on either side a reasonable choice for the inner ones? Could you use 2:3 for 1 and end-2:end-1 for the last just as well? Or, do the inner ones first and then just use the adjacent one for the two edges???
So many questions and possibilities; so few answers!!! :)

Sign in to comment.

Answers (0)

Categories

Find more on Matrices and Arrays 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!