%% Unidirectional Linear Sweep
% In this example, the Chirp block outputs a unidirectional, linearly
% swept chirp signal. The Time Scope displays the signal output in the
% time domain and the Spectrum Analyzer displays the spectrogram in the
% frequency domain.
%
% Copyright 2018 The MathWorks, Inc.

%%
% To obtain a unidirectional sweep with known initial and final frequency
% values, in the Chirp block set the *Target time* equal to *Sweep time*.
% In which case, the *Target frequency* becomes the final frequency in the
% sweep. Since the *Target time* is set to equal *Sweep time* (1 second),
% the *Target frequency* (25 Hz) is the final frequency of the
% unidirectional sweep. This technique might not work for swept cosine
% sweeps. For details, see the <docid:dsp_ref.f3-862950 Limitations> 
% described for the *Frequency sweep* parameter.

%%
% Run the model to see the time domain output:
model = 'ex_chirp_unidirectional_sweep';
open_system(model)
%%
sim(model)
open_system([model '/Time Scope'])
open_system([model '/Spectrogram'])