searching through a matrix



hi, i need help to write a more specific algorithm for a section of
my code, hopeing someone can help...stick with me here...

i have about 4000 rows, and 3 coloumns in a matrix.
i also have a number value the user inputs called n

the values in the 1st and 2nd coloumn are x and y coordinates of the
value in the 3rd coloumn (which is a pixel intensity value).

some of the values (intensity) in the 3rd coloumn is -1.

here it is....
i need to go through every row in the 3rd coloumn untill i come
across a -1 (which i have done)...then...

find 'n' number of values in the 3rd coloumn NOT equal to -1, that
are positioned NEAREST to the -1 i have found, and return their
intensity values....

hope someone can help....thanks....Marley
.



Relevant Pages

  • Re: searching through a matrix
    ... hopeing someone can help...stick with me here... ... value in the 3rd coloumn (which is a pixel intensity value). ... are positioned NEAREST to the -1 i have found, ...
    (comp.soft-sys.matlab)
  • Re: searching through a matrix
    ... i need help to write a more specific algorithm for a section of ... hopeing someone can help...stick with me here... ... value in the 3rd coloumn (which is a pixel intensity value). ...
    (comp.soft-sys.matlab)