As of my knowledge, a Dwell-and-Switch PRI sequence is generated by repeating the same Pulse Repetition Interval (PRI) for a fixed number of pulses (dwell) and then switching to a new PRI value. This process cycles through different PRIs to reduce range and Doppler ambiguities. 
In MATLAB, such a sequence can be generated using the following approach: 
- Choose a set of distinct Pulse Repetition Interval (PRI) values to cycle through. 
- Decide how many consecutive pulses (dwell) will use the same PRI before switching to the next. 
- For each PRI value, repeat it for the specified dwell (number of pulses), then switch to the next PRI. This creates a sequence. 
- To extend the pattern, repeat the dwell-and-switch sequence for the desired number of cycles. 
- Use the cumulative sum of the PRI sequence to determine the start times of each pulse. 
- Plot the PRI values across pulse indices. 
Here is an example MATLAB code: 
PRI_values = [100e-6 120e-6 80e-6]; 
PRI_sequence = repelem(PRI_values, dwellPulses);  
PRI_sequence = repmat(PRI_sequence, 1, numCycles); 
pulseTimes = cumsum(PRI_sequence); 
stem(1:length(PRI_sequence), PRI_sequence*1e6, 'filled'); 
title('Dwell-and-Switch PRI Sequence'); 
- Each PRI value (100 µs, 120 µs, 80 µs) is repeated for 5 pulses (the dwell). 
- After that, the PRI “switches” to the next value. 
- The entire sequence repeats for the specified number of cycles.