RE: Help
- To: mathgroup@smc.vnet.net
- Subject: [mg11151] RE: [mg11115] Help
- From: BobHanlon@aol.com
- Date: Mon, 23 Feb 1998 21:41:10 -0500
soln ={{a -> 32}, {a -> -22}, {a -> 49}}; To get the substitution rules with positive values, do the following: Select[soln, (a /. #) > 0&] {{a -> 32}, {a -> 49}} If all you want are the positive values themselves, then use: Select[a /. soln, # > 0&] {32, 49} Bob Hanlon FORWARDED MESSAGE: I have 3 solutions for a which are {a -> 32, a -> -22, a -> 49}. I want to use the positive answer to sub in a folowing equation. The code that I wrote is aList = Re[Last/@Flatten[%]]; aList = Select[%, #>0 &];*) For[ m = 1, m < size, m++, aList[[m]] ]; Howver, it doesnt seem to work the way I want. Thanks Colin