Don’t use the Symbolic Math Toolbox. Use an anonymous function instead:
[T, Y] = meshgrid(0:0.2:6, 0:0.2:1);
S = @(t,y) 5*y.*(1-y)-(1+(1/2)*sin(2*pi*t));
L = sqrt(1 + S(T,Y).^2);
quiver(T, Y, 1./L, S(T,Y)./L, 0.45)
axis tight; xlabel('t'), ylabel('y')
title('Slope field field')
This works. I will leave it to your to determine if it produces the correct results. For information on anonymous functions, see the appropriate sections in Function Basics.
