# Converting negative value to zero [closed]

I would like to convert the negative outcome of $$r_2$$ to zero. I have used the following code, but it still gives me a negative value. Is there any option to turn the negative outcome directly to zero? I already set the different random value of γ.

FullSimplify[Subscript[r, 2] -> (γ Subscript[c, 1] , Subscript[r, 2] > 0]

• You could use UnitStep[] for this... – J. M.'s ennui Feb 1 at 8:31
• Change the definition of r_2 so that it returns zero for negative values. – Daniel Huber Feb 1 at 10:36
• Or Clip[..., {0, Infinity}]. – Michael E2 Feb 1 at 15:26
• try Ramp? – kglr Feb 1 at 15:32