Say I have a piecewise function:
V[m_] := Piecewise[{{(1 + m)^2, m >= 1}, {Log[m], m < 1}}]
And I input a large list of m
values, I get three lists output: The list of V[m]
values, the list of m
values for which m >= 1
, and the list of m
values for which m < 1
.
I only require an output list of the V[m]
values. How do I get rid of the other two lists?
Apologies if this is an obvious question! Any help would be greatly appreciated.
V /@ {1, 10, 200, 0.1, 100}
outputs{4, 121, 40401, -2.30259, 10201}
. Is this not what you want? $\endgroup$V
evaluate lists the way you were expecting it to. See my answer below. $\endgroup$