Re: List Manipulation

*To*: mathgroup at smc.vnet.net*Subject*: [mg72463] Re: List Manipulation*From*: "Ray Koopman" <koopman at sfu.ca>*Date*: Fri, 29 Dec 2006 05:27:50 -0500 (EST)*References*: <emo866$g29$1@smc.vnet.net><200612271059.FAA21974@smc.vnet.net>

Andrzej Kozlowski wrote: > Note that there are many cases for which this will not work, e.g. > > > {5*k, 6, 78+4I*k+12*k} /.{a_+b_*k->{a,b}} > > > {5 k,6,{78,12+4*I}} > > Andrzej Kozlowski > > > On 27 Dec 2006, at 19:59, Arkadiusz.Majka at gmail.com wrote: > >> In[13]:= >> {2+5*k, 6+2*k, 78+12*k} /.{a_+b_*k->{a,b}} >> >> Out[13]= >> {{2,5},{6,2},{78,12}} >> >> A. >> >> >> >> Stratocaster napisal(a): >>> I'm not sure if the following is possible or whether it exists >>> somewhere >>> between the realms of fantasy and science fiction. I have been >>> unable to do >>> it. >>> >>> Given a list, set, vector (whatever you want to call it) >>> consisting of >>> functions of the same variable, i.e. >>> >>> list = {a1+b1*k, a2+b2*k, a3+b3*k...} >>> >>> Assuming they are all linear (of the form a+b*k) is there away to >>> isolate >>> the a_i and b_i values? Essentially I would like to get a list "A" >>> consisting of all the intercept values, and a list "B" consisting >>> of all the >>> slope values. >>> >>> Is this possible? What kind of operations do I need to use to >>> accomplish >>> this (if indeed it is possible)? >>> >>> Thanks for any insights. >> I was assuming, on the basis of a thread in a different newsgroup, that the terms in list were produced by Fit.

**References**:**Re: List Manipulation***From:*Arkadiusz.Majka@gmail.com