% Example Problem in MatLab - Plotting a Function
% Barukyah Shaparenko and John M. Cimbala

clear all
close all

% Let's plot the function f(t) = sin(2*pi*f*t)

freq = 10; % Frequency, Hz
t_start = 0; % Start time, sec
del_t = 0.005; % Time interval, sec
t_end = 0.4; % End time, sec

t = [t_start:del_t:t_end]; % Time range for plot

f = sin(2*pi*freq.*t); % Compute f(t)

figure(1); hold on;
plot(t,f,'r-',t,f,'bo')
xlabel('{\it t} (s)',    'FontWeight','Bold')
ylabel('{\it f} ({\itt })','FontWeight','Bold')
grid
hold off;
