The Symbolic Math Toolbox function mod() changed behavior in 2020b so that (it appears) that such a function can now be easily defined. Link to doc page. I think I was experimenting with mod() in 2019a and that's why it wasn't working for me.
s(t) = triangularPulse(0,1,1.5,t);
s_p(t,P) = s(mod(t,P))
s_p(t, P) =