Technical discussion about Matlab and issues related to Digital Signal Processing.
Hi all
I was wondering if there is a way to search within a matrix
of 2x10
This search would point out a value which has
repeated within the same row 3 times. This value
could have a variation of +/-0.5. The output of the
system would be the average of these three values.
thought of using a coulple of if conditions, but I'm
not sure how to start.
suggestions are appreciated
-----------------------------------------------
EXAMPLE:
Matrix=[89.5 90 75 23 80 90.2 24 -1 5 101;
44 34 22 -10 43 46 90 2 15 48]
output would be: [89.5 90 90.2; 44 34 46]
then I would average each row and get the x,y coordinates
------------------------------------------------
Additional info:
the system would work like this
-the first row is searched and averaged
-second row is searched and averaged
-in case that there are to sets with similarities (
89.5 90 90.2 and 77 77.4 76.8 in the same row)
a seperate array or a third row is going to be there.
(i'm still working on the algorithm).
Each value in this third row is considered the amplitude
for both the first and second column, the higher value
in the third row, the more likely the x,y values are correct
and hence should be chosen.
Example: for the above
89.5 90 90.2 77 77.4 76.8
Amp: .2 .1 .5 .01 .02 .3
the first set is chosen (the left hand side i.e. 89.5,...)
Thank you