Prev: solving a system of COUPLED partial differential equations
Next: Shape Recognition using regionprops
From: Tommy on 1 Jun 2010 10:01 I have an array named th actually it is a structure, so the values of th is in th.signals.values but i guess that is the same thing. the numbers in th are increasing and i want to know when the first certain value occurs. to be more exact i want to know what position in the array the holds the value 8400, however there are many values of 8400, but i want to know the first (counting form the top of the array) im looking for something similar to the command find which finds and returns the indices of all zeros of an array, but i want it to find and return the indices of all values of 8400 (well i actually only need to know the first 8400 occurs, but either is ok) how can this be done?
From: ImageAnalyst on 1 Jun 2010 10:06 index = find(th.signals.values == 8400, 1, 'first')
From: Tommy on 1 Jun 2010 11:10
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <e6c4b72d-4cb3-43ee-9bd2-3b8729fd1a95(a)d12g2000vbr.googlegroups.com>... > index = find(th.signals.values == 8400, 1, 'first') thanks alot!! |