Re: Sum of terms --> list
- To: mathgroup at smc.vnet.net
- Subject: [mg127280] Re: Sum of terms --> list
- From: bar at ANTYSPAM.ap.krakow.pl
- Date: Sat, 14 Jul 2012 01:26:48 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <jtd4ec$9r3$1@smc.vnet.net>
Dana DeLouis <dana01 at me.com> wrote: > > LB[z_] := List @@ B[z] > > LB[3] (* NOT OK*) [...] > One needs to hold the evaluation, or perhaps just: > B[z_]:=1/(2-z)+3/(4-z)+5/(6-z) > LB[z_]:=(List@@B[#1]) /. #1 -> z > LB[x] > {1/(2-x), 3/(4-x), 5/(6-x)} > LB[3] > {-1, 3, 5/3} > = = = = = = = = = = > HTH :>) > Dana DeLouis > Mac & Math 8 > = = = = = = = = = = After help from Thomas G. i have found a simple solution I have used B[z_] := 1/(2 - z) + 3/(4 - z) + 5/(6 - z); LB[z_] = List @@ B[z] (* = instead := in function definition*) LB[3] It gives good solution, I'm not sure if this way can have bad consequences .. Olaf