Worcester Polytechnic Institute

Continuous Time Plot

Home

Google

Online Materials

Contact Us

Site Map

 

Here is the setup for the time domain array from 1 to (length(wave)-1)/fs, by increments of 1/fs.  The variable fs is the sampling frequency or the number of samples per second.  The 1/fs is expressing the increment, note that one divided by the sampling frequency leaves us with a number in seconds.  The upper bound is the number of data points divided by the sampling frequency.  The result is the total amount of seconds contained in the wave file.

          t=0:1/fs:(length(wave)-1)/fs;

 

We have done most of the work now, just need to setup the plotting commands.  Create a new figure window with the figure command.  This will isolate this plot to its own window.  Next plot the wave by the time domain array t that we created above.  The title, ylabel, and xlabel commands create the title, and axes labels on the plot after it has been plotted.

          figure(1);

          plot(t,force);

          title(‘The Force’);

          ylabel('Amplitude');

          xlabel('Length (in seconds)');

 

 

This is the continuous time plot of the wave file “Remember the force will be with you, always.”

 

Take the FFT of this wave file or return to Wave File Analysis.

[WPI]