Quantcast
Channel: MATLAB Central Newsreader - tag:"find"
Viewing all articles
Browse latest Browse all 55

Finding Position in Matrix/Array

$
0
0
I need help identifying where certain parts of an array are. So for example, I have an array of letters

example = OOOOOOOOOOO
               OOOOOOOOOOO
               OOOOOOPOOOO
               OOOOOROOOOO

I want to be able to let Matlab tell me what row and column P and R are in

somecommand(example(P)) = (3, 7)
somecommand(example(R)) = (4, 6)

Is this even possible?

Viewing all articles
Browse latest Browse all 55

Trending Articles