function [x,t]=samp_sine(f0,Tw,fs) %% SAMP_SINE Function to produce samples of a sinewave %% The user specifies the sinusoid frequency, the length of %% the time interval, and the sample frequency. %% %% Usage: %% [x,t]=samp_sine(f0,Tw,fs) %% %% Variables: %% f0 = frequency of the sinusoid (Hz) %% Tw = length of time interval (seconds) %% fs = sampling frequency (Hz) %% %% x = samples of the sinusoidal signal %% t = vector of sample times (for plotting) t=0:1/fs:Tw; x=sin(2*pi*f0*t); return