Prev: wavelet transform problem
Next: www.voguesneakers.com Cheap Jordans,Cheap Nike Shox,Cheap Air Max
From: Steven Lord on 10 Jun 2010 12:54 "Snow White" <gulesaman(a)gmail.com> wrote in message news:hur55o$2hq$1(a)fred.mathworks.com... >P is a row vector of size 1 7749245 Didn't we have this discussion earlier in the thread? Look at posts 4 and 7 in this thread. Make A, B, C, and D column vectors. Combine them together to make an N-by-5 matrix p. Loop over the rows of p. Calculate the ROOTS of each row and store them in the rows of theroots. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: Snow White on 10 Jun 2010 14:04 Thank you. I have done as u had suggested but i dont understand how should i index the resultant theroots? i have done the following: [pr,pc]=size(p); for pr_index=1:pr theroots(:,:)= roots(p(pr_index,:)); %%computing roots of the equation inorder to find the refractive index end but that ofcourse only gives the last value stored in it. and the size is as follows: size(theroots(:,:)) ans = 4 1 i am confused about how to extract the roots at each point. bye "Steven Lord" <slord(a)mathworks.com> wrote in message <hur5c4$fab$1(a)fred.mathworks.com>... > > "Snow White" <gulesaman(a)gmail.com> wrote in message > news:hur55o$2hq$1(a)fred.mathworks.com... > >P is a row vector of size 1 7749245 > > Didn't we have this discussion earlier in the thread? Look at posts 4 and 7 > in this thread. > > Make A, B, C, and D column vectors. > Combine them together to make an N-by-5 matrix p. > Loop over the rows of p. > Calculate the ROOTS of each row and store them in the rows of theroots. > > -- > Steve Lord > slord(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ > To contact Technical Support use the Contact Us link on > http://www.mathworks.com >
From: Steven Lord on 10 Jun 2010 15:39 "Snow White" <gulesaman(a)gmail.com> wrote in message news:hur9f4$ht2$1(a)fred.mathworks.com... > Thank you. > > I have done as u had suggested but i dont understand how should i index > the resultant theroots? i have done the following: > > [pr,pc]=size(p); > for pr_index=1:pr > theroots(:,:)= roots(p(pr_index,:)); %%computing roots of the equation > inorder to find the refractive index > end > but that ofcourse only gives the last value stored in it. and the size is > as follows: > size(theroots(:,:)) You're almost there. On the right-hand side of the body of your FOR loop, you extracted row pr_index of p. Now on the left-hand side you want to insert the results into row pr_index of theroots. Since those sentences sound somewhat similar in their descriptions, perhaps the code is similar? theroots(pr_index, ... -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: Snow White on 10 Jun 2010 15:55 i had already tried that : for pr_index=1:pr theroots(pr_index,:)= roots(p(pr_index,:)); %%computing roots of the equation inorder to find the refractive index end and i get this ??? Subscripted assignment dimension mismatch. roots gives 4 root values for each element. "Steven Lord" <slord(a)mathworks.com> wrote in message <hurf0o$q4c$1(a)fred.mathworks.com>... > > "Snow White" <gulesaman(a)gmail.com> wrote in message > news:hur9f4$ht2$1(a)fred.mathworks.com... > > Thank you. > > > > I have done as u had suggested but i dont understand how should i index > > the resultant theroots? i have done the following: > > > > [pr,pc]=size(p); > > for pr_index=1:pr > > theroots(:,:)= roots(p(pr_index,:)); %%computing roots of the equation > > inorder to find the refractive index > > end > > but that ofcourse only gives the last value stored in it. and the size is > > as follows: > > size(theroots(:,:)) > > You're almost there. On the right-hand side of the body of your FOR loop, > you extracted row pr_index of p. Now on the left-hand side you want to > insert the results into row pr_index of theroots. Since those sentences > sound somewhat similar in their descriptions, perhaps the code is similar? > > theroots(pr_index, ... > > -- > Steve Lord > slord(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ > To contact Technical Support use the Contact Us link on > http://www.mathworks.com >
First
|
Prev
|
Pages: 1 2 3 Prev: wavelet transform problem Next: www.voguesneakers.com Cheap Jordans,Cheap Nike Shox,Cheap Air Max |