Suppose I have the following results:
a=FindInstance[2*b^2 + b^3 == b^4 + t && t < 10 && t > -1, {b, t},
Integers, 20]
{{b -> -1, t -> 0}, {b -> 0, t -> 0}, {b -> 1, t -> 2}, {b -> 2,
t -> 0}}
How can I get rid of the "b->" and just get the array of b answers? I can get halfway there with:
a[[All,1]]
{b -> -1, b -> 0, b -> 1, b -> 2}
but how can I get to just:
{-1, 0, 1, 2}
Thanks
I might be missing something from dreeves' answer, but the way I always believed you do this was simply by writing:
b /. a
There is an example of this in the "Basic Examples" section of the documentation for the Solve
function, which uses the same output style.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With