I have a piecewise function like this.
fP = Piecewise[{{x^2, x < 0}, {x, x > 0}}];
Plot[fFu, {x, -2, 2}]
Now I want to get the y value at a certain x position, e.g at x=1 the result should be 1.
But when I do
Print[fP[1]];
I just get the peacewise function itself as output and not the value.





Print, you can just evaluatefP[1]Also see this – BlacKow Oct 03 '16 at 17:09