MATLAB
Home ] Up ] 54622D ] Audio ] Excel ] Maple ] [ MATLAB ] PSpice ]

 

Step 1: Create the waveform samples

Suppose you create the swept-sinusoidal signal below (the sinusoid begins at 100 Hz, increases to 400 Hz during a time interval of two seconds, and has a sampling frequency of 4 kHz):

fs = 4000			% sampling frequency
tt = 0:1/fs:2-1/fs;		% time vector
sig = chirp(tt,100,2,400)';	% signal

Please note that your waveform vector must be a column vector, e.g., N x 1. The transpose operation in the line containing the "chirp" function converts the row vector to a column vector.  

Step 2: Create the .CSV file

Next, do:

save file.csv -ascii sig

Step 3: Calculate the 33120A frequency setting

Calculate the 33120A frequency setting as follows:

fs/length(sig)

Example files

matlab_csv.m (create waveform data and save to a file)
matlab_csv.csv (file created by matlab_csv.m)
0.5 Hz (frequency setting for 33120A; enter "0.0005" as the frequency in Waveform Editor)

 

 

 

Department of Electrical and Computer Engineering
Rose-Hulman Institute of Technology
Terre Haute, IN 47803-3999

Page last updated 06/05/01