From: ravi on 27 May 2010 22:58 Hi, I have 2 vectors: A = [1; 2; 3; 4] & B = [6; 7; 8; 9] I want to extract number 4 from vector A, so I use A(A>3) Now, I want to automatically get the corresponding value 9 from matrix B , without using B(B>8). Please help. Ravi
From: Walter Roberson on 27 May 2010 23:02 ravi wrote: > I have 2 vectors: > > A = [1; 2; > 3; > 4] > > & > > B = [6; > 7; > 8; > 9] > > > I want to extract number 4 from vector A, so I use A(A>3) > > Now, I want to automatically get the corresponding value 9 from matrix B > , without using B(B>8). T = A>3; A(T) B(T) Alternately, T = find(A>3); A(T) B(T)
From: ravi on 27 May 2010 23:16 Appreciate the help Walter. best ravi Walter Roberson <roberson(a)hushmail.com> wrote in message <4nGLn.40814$wV.5092(a)newsfe11.iad>... > ravi wrote: > > > I have 2 vectors: > > > > A = [1; 2; > > 3; > > 4] > > > > & > > > > B = [6; > > 7; > > 8; > > 9] > > > > > > I want to extract number 4 from vector A, so I use A(A>3) > > > > Now, I want to automatically get the corresponding value 9 from matrix B > > , without using B(B>8). > > T = A>3; > A(T) > B(T) > > Alternately, > > T = find(A>3); > A(T) > B(T)
|
Pages: 1 Prev: Using Solve to solve system of 2 eqns Next: split an exponential pdf into bins |