|
[Date Index]
[Thread Index]
[Author Index]
RE: Help
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
Prev by Date:
Writing output to text files
Next by Date:
Mathematica Graphics for V3?
Prev by thread:
Help
Next by thread:
RE: Help
|