% Define the rect function
rect = @(t) (abs(t) <= 0.5);



% Define the product function
f = @(t)  rect(t );

% Plot using fplot
figure;
fplot(f, [-2, 10], 'LineWidth', 1.5); % Adjust x-axis range as needed
grid on;
xlabel('t');
ylabel('f(t)');
title('Plot of rect(t)');
