%% Intermodulation Analysis of Idealized Baseband Amplifier
% This model shows how to perform intermodulation analysis of the amplifier
% block from the RF Blockset(TM) Idealized Baseband library.

% Copyright 2003-2016 The MathWorks, Inc.

%% Example Model
% Fig. 1 Idealized Baseband amplifier intermodulation example model:
open('math_amp.slx');

%% Simulation Results
% Fig. 2 Spectrum of the input two-tone signal:
sim('math_amp',0.1e-3);
close_system('math_amp/Output');

%%
% The following figure shows the spectrum of the output signal of the
% Idealized Baseband amplifier. You can see the intermodulation generated
% by the amplifier's nonlinearity.
% 
% Fig. 3 Two-tone output:
open_system('math_amp/Output');

%%
% To view the intermodulation performance at the output, double click the
% Slider Gain blocks and change the gain while the model is running.

bdclose('math_amp');

displayEndOfDemoMessage(mfilename)