Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Indexing
Posted:
Mar 5, 2013 11:06 PM


On Wednesday, March 6, 2013 4:16:09 PM UTC+13, Eric wrote: > Hi, > > > > I know I should be able to figure this out based on previous posts, but I still cannot find the correct solution. Within matrix A (nx1 matrix), I want to find the first instance that a value BW is 10 units less than BWI'll call this value DROP. It is not a min or max value. I am just trying to index points on a force waveform so I can eventually integrate the area between points. > > > > Specifically: > > BW= 650; > > DROP = BW10; > > [event1,ind1] = A(DROP,1); > > > > Using this, I get an error 'Indexing cannot yield multiple results'. > > > > I tried using find but all the values will be positive numbers. > > > > Any suggestion is greatly appreciated. > > > > Thanks, > > > > Eric
The error message is pretty clear. Why do you have two arguments on the LHS? What are you expecting to get when you ask for the DROPth element of A? Try this: A(DROP,1)



