Prev: Animations
Next: figure border
From: Snow White on 24 Jul 2010 20:35 helllo, i am computing roots using the roots functions, i have 4 roots: p= [A.^2 (2.*A.*C-1) ((2.*A.*B)+(C.^2)+D) 2.*B.*C B.^2]; [pr,pc]=size(p); theroots = zeros(pc-1,pr) for pr_index=1:pr theroots(:,pr_index)= roots(p(pr_index,:)); %%computing roots of the equation inorder to find the roots end i want to filter some roots that are outside the range which is as follows: (theroots(:,:,r_i)<2.5) && (theroots(:,:,r_i)>1)) how can i do this? Bye
From: Snow White on 29 Jul 2010 06:34 "Snow White" <gulesaman(a)gmail.com> wrote in message <i2g0ro$5e$1(a)fred.mathworks.com>... > helllo, > > i am computing roots using the roots functions, i have 4 roots: > > p= [A.^2 (2.*A.*C-1) ((2.*A.*B)+(C.^2)+D) 2.*B.*C B.^2]; > > [pr,pc]=size(p); > theroots = zeros(pc-1,pr) > for pr_index=1:pr > theroots(:,pr_index)= roots(p(pr_index,:)); %%computing roots of the equation inorder to find the roots > end > > i want to filter some roots that are outside the range which is as follows: > > (theroots(:,:,r_i)<2.5) && (theroots(:,:,r_i)>1)) > > how can i do this? > > Bye for example the following are the four roots that i get for a 3x3 image [1 2 3; 4 5 6; 7 8 9] [4 1.5 5, 1 2 1.2; 7 8 9] [4 1.2 6,8 9 10, 1 2 3] [7 8 9;10 11 12;7 8 1.5] now want i want is to filter out the vals between 1 and 2.5 but if u see 1,2 in three places the val falls in that range so wat i wanted was that if there are multiple values falling in that range for one location so the resultant matrix shud have three versions where only that place where there are more than one values is replaced and if not in the range then it shud be 0.
|
Pages: 1 Prev: Animations Next: figure border |