Technical data

Agilent N516xA, N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 75
Creating and Downloading Waveform Files
Programming Examples
Creating and Downloading a Pulse
NOTE This section applies only to the Agilent MXG and the PSG.
For the Agilent MXG, the maximum frequency is 6 GHz, and the pulsepat.m program’s
SOURce:FREQuency 20000000000 value must be changed as required in the following
programs. For more frequency information, refer to the signal generator’s Data Sheet.
On the documentation CD, this programming example’s name is “pulsepat.m.”
This MATLAB programming example performs the following functions:
I and Q data creation for 10 pulses
•marker file creation
data scaling
downloading using Agilent Waveform Download Assistant functions (see “Using the Download
Utilities” on page 46 for more information)
% Script file: pulsepat.m
%
% Purpose:
%To calculate and download an arbitrary waveform file that simulates a
%simple antenna scan pulse pattern to the Agilent MXG/PSG vector signal generator.
%
% Define Variables:
% n - - counting variable (no units)
% t -- time (seconds)
% rise - - raised cosine pulse rise–time definition (samples)
% on - - pulse on–time definition (samples)
% fall - - raised cosine pulse fall–time definition (samples)
% i - - in–phase modulation signal
% q - - quadrature modulation signal
n=4; % defines the number of points in the risetime and falltime
t=1:2/n:12/n; % number of points translated to time
rise=(1+sin(t*pi/2))/2; % defines the pulse rise–time shape
on=ones(1,120); % defines the pulse ontime characteristics
fall=(1+sin(–t*pi/2))/2; % defines the pulse fall–time shape
off=zeros(1,896); % defines the pulse offtime characteristics