Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: eliminate all the occurrences of "theta ->" and "lambda ->"

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85604] Re: eliminate all the occurrences of "theta ->" and "lambda ->"
  • From: Grischika at mail.ru
  • Date: Thu, 14 Feb 2008 18:49:58 -0500 (EST)
  • References: <fp0m2u$5v7$1@smc.vnet.net>

On 14 =C6=C5=D7, 08:11, "Richard Hofler" <rhof... at bus.ucf.edu> wrote:
> Hello All,
>
> I'm relatively new to Mathematica. Here's my problem.
>
> I have this list that I generated from FindMaximum:
>
> results = {{-5933.0186,{q*4.5785,l*1.0231}},
> =9A =9A{-5960.3876,{q*5.0002,l*1.0085}},
> =9A =9A{-5929.7166,{q*3.9758,l*1.0951}},
> {-5929.4666,{q*3.9308,l*1.3277}},
> {-5933.7226,{q*4.7088,l*1.1294}},
> {-5928.0464,{q*3.6767,l*1.1019}}};
>
> How do I eliminate all the occurrences of "q*" and "l*"
> to transform it into this list?
>
> {{4.5785,1.0231},{5.0002,1.0085},{3.9758,1.0951},
> {3.9308,1.3277},{4.7088,1.1294},{3.6767,1.1019}}
>
> BTW, I can evaluate this function
>
> Take[Partition[Flatten[results],3],All,2;;3]
>
> to get to this point:
>
> {{q*4.5785,l*1.0231},{q*5.0002,l*1.0085},{q*3.9758,l*1.0951},{q*3.9308,l
> *1.3277},{q*4.7088,l*1.1294},{q*3.6767,l*1.1019}}
>
> $Version
> 6.0 for Microsoft Windows (32-bit) (June 19, 2007)
>
> Thanks very much for any help that you may offer.
> Richard
>
> Richard Hofler
> Professor
> Department of Economics
> College of Business Administration
> P.O. Box 161400
> University of Central Florida
> Orlando, FL 32816-1400
> 407-823-2606

Hello.
Use Replace:
results //. {{x_, {y__}} -> {y}, q -> 1, l -> 1}


  • Prev by Date: FW: eliminate all the occurrences of "theta ->" and "lambda ->" THANK YOU
  • Next by Date: Re: Re: Re: Sphere through 4 points
  • Previous by thread: Re: eliminate all the occurrences of "theta ->" and "lambda ->"
  • Next by thread: Re: eliminate all the occurrences of "theta ->" and "lambda ->"