smin = -9/10; smax = pi/2;
sp_t_min = max(s_t, smin);
sp_t     = min(sp_t_min, smax);

close all; 
plot(t, s_t); hold on;
stem(t, sp_t, 'r');