From: Tobias malach on 15 Jun 2010 03:15 Hi, I'm asking for help. There is a vector of lenght M. For example i know that there is a value 1.5 somewhere in vector(I used function "max") but I need to know the position of this vaule in vector. Could someone help? Thanks.
From: James Tursa on 15 Jun 2010 03:28 "Tobias malach" <tmalach(a)seznam.cz> wrote in message <hv79a9$o83$1(a)fred.mathworks.com>... > > There is a vector of lenght M. For example i know that there is a value 1.5 somewhere in vector(I used function "max") but I need to know the position of this vaule in vector. doc max Look at the last syntax. e.g., [m x] = max(v); % m is max, x is index of max James Tursa
From: Debanga Neog on 15 Jun 2010 03:37 Hi, A more appropriate solution can be: Let, A = [1 3 22 1.5 6]; For finding the index of value 1.5, use: index = find(A == 1.5); -DRN
From: us on 15 Jun 2010 04:01 "Debanga Neog" <debanga_raj(a)yahoo.co.in> wrote in message <hv7aj0$dr7$1(a)fred.mathworks.com>... > Hi, > A more appropriate solution can be: > Let, > A = [1 3 22 1.5 6]; > For finding the index of value 1.5, use: > index = find(A == 1.5); > > > -DRN well... maybe(!)... just keep this in mind http://matlabwiki.mathworks.com/MATLAB_FAQ#Why_is_0.3-0.2-0.1_not_equal_to_zero_.28or_similar.29.3F us
From: Tobias malach on 15 Jun 2010 04:23 "us " <us(a)neurol.unizh.ch> wrote in message <hv7c00$ff2$1(a)fred.mathworks.com>... > "Debanga Neog" <debanga_raj(a)yahoo.co.in> wrote in message <hv7aj0$dr7$1(a)fred.mathworks.com>... > > Hi, > > A more appropriate solution can be: > > Let, > > A = [1 3 22 1.5 6]; > > For finding the index of value 1.5, use: > > index = find(A == 1.5); > > > > > > -DRN > > well... maybe(!)... > just keep this in mind > > http://matlabwiki.mathworks.com/MATLAB_FAQ#Why_is_0.3-0.2-0.1_not_equal_to_zero_.28or_similar.29.3F > > us everything's fine thank you very much!!!
|
Pages: 1 Prev: Become the Best Project Manager Next: biochemical engineering |