Documentation

step

System object: phased.PhaseCodedWaveform
Package: phased

Samples of phase-coded waveform

Syntax

Y = step(sPCW)
Y = step(sPCW,prfidx)

Description

Y = step(sPCW) returns samples of the phase-coded pulse in a column vector, Y.

Y = step(sPCW,prfidx), uses the prfidx index to select the PRF from the predefined vector of values specified by in the PRF property. This syntax applies when you set the PRFSelectionInputPort property to true.

    Note:   The object performs an initialization the first time the step method is executed. This initialization locks nontunable properties and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object™ issues an error. To change nontunable properties or inputs, you must first call the release method to unlock the object.

Input Arguments

sPCW

Phase-coded waveform object.

Output Arguments

Y

Column vector containing the waveform samples.

Examples

expand all

Create Pulse Coded Waveform

Generate samples of two pulses of a phase-coded pulse waveform that uses the Zadoff-Chu code.

sPCW = phased.PhaseCodedWaveform('Code','Zadoff-Chu',...
    'ChipWidth',1e-6,'NumChips',16,...
    'OutputFormat','Pulses','NumPulses',2);
wav = step(sPCW);
fs = sPCW.SampleRate;
nsamps = size(wav,1);
t = [0:(nsamps-1)]/fs;
plot(t*1e6,real(wav))
title('Waveform: Real Part')
xlabel('Time (\mu sec)')
ylabel('Amplitude')
grid

Create Phase-Coded Waveform with Variable PRF

Create and plot two-pulse phase-coded waveforms that uses the Zadoff-Chu code. Set the sample rate to 1 MHz, a chip width of 5 microseconds, 16 chips per pulse. Vary the pulse repetition frequency.

fs = 1e6;
PRF = [5000,10000];
sPCW = phased.PhaseCodedWaveform('SampleRate',fs,...
    'Code','Zadoff-Chu','PRFSelectionInputPort',true,...
    'ChipWidth',5e-6,'NumChips',16,'PRF',PRF,...
    'OutputFormat','Pulses','NumPulses',2);

Obtain and plot the phsed-coded waveforms. For the first call to the step method, set the PRF to 10kHz using the PRF index. For the next call, set the PRF to 25 kHz. For the final call, set the PRF to 10kHz.

wav = [];
wav1 = step(sPCW,1);
wav = [wav; wav1];
wav1 = step(sPCW,2);
wav = [wav; wav1];
wav1 = step(sPCW,1);
wav = [wav; wav1];
nsamps = size(wav,1);
t = [0:(nsamps-1)]/fs;
plot(t*1e6,real(wav))
xlabel('Time (\mu sec)')
ylabel('Amplitude')

Was this topic helpful?