Question: Broken Piecewise Function

Yo I have fit a surface to a curve using polynomial regression:

(It's only supposed to be fit for negative t domain)

Now I've attempted to cap this function off at 0, using a piecewise function of the original:

Which when I print, looks somewhat about right:

Sorry it's so hard to see but you get the idea. The problem is that this seems to set the whole function to 0, rather than just the bits that should clip:

The piecwise function seems to be evaluating the fN>0 condition to true for all input values p,t, rather than substituing the new input values into the original function fN, and then evaluating the condition for every point, not really sure what the problem is, would appreciate some help!

Please Wait...