MATLAB Examples

The basic structure of turbo codes, both at the transmitter and receiver ends, and characterizes their performance over a noisy channel using components from the Communications System

This model shows how to simulate a phase-locked loop (PLL) frequency synthesizer. The model multiplies the frequency (synFr) of a reference signal by a constant synN/synM, to produce a

This model shows a satellite link, using the blocks from the Communications System Toolbox™ to simulate the following impairments:

This model shows how to use the SISO Fading Channel block from the Communications System Toolbox™ to simulate multipath Rayleigh and Rician fading channels, which are useful models of

This model shows symbol timing adjustments using interpolation and numerically controlled oscillator (NCO) based control as part of clock recovery in a digital modem as described in the

This model shows the implementation of a QPSK transmitter and receiver. The receiver addresses practical issues in wireless communications, e.g. carrier frequency and phase offset,

This model shows the state-of-the-art channel coding scheme used in the second generation Digital Video Broadcasting standard (DVB-S.2), planned to be deployed by DIRECTV in the United

This model shows an adaptive orthogonal space-time block code (OSTBC) transceiver system over a multiple-input multiple-output (MIMO) channel. The system uses a variable number of

This model shows the effects of adjacent and co-channel interference on a PSK modulated signal. The model includes two interferers, Interferer 1 and Interferer 2. The model enables you to

HDL code generation support for the Viterbi Decoder block. It shows how to check, generate, and verify the HDL code you generate from a fixed-point Viterbi Decoder model. This example also

This model shows how to use the Convolutional Encoder and Viterbi Decoder blocks to simulate a tail-biting convolutional code. Terminating the trellis of a convolutional code is a key

This model shows the improvement in BER performance when using log-likelihood ratio (LLR) instead of hard decision demodulation in a convolutionally coded communication link.

This model shows how to simulate a phase-locked fractional-N frequency synthesizer. The model multiplies the frequency synFr of a reference signal by a constant synN+synM, to produce a

Implement a 64-QAM transmitter and receiver for HDL code generation and hardware implementation. These models are based on the models HDL Optimized QPSK Transmitter and HDL Optimized QPSK

This model shows the use of a CORDIC (COordinate Rotation DIgital Computer) rotation algorithm in a digital PLL (Phase Locked Loop) implementation for QPSK carrier synchronization.

Implement encoder and decoder for the IEEE® 802.16 standard [ 1 ] using the HDL Optimized Reed-Solomon (RS) Encoder and Decoder library blocks.

Optimize the QPSK transmitter modeled in commqpsktxrx.slx for HDL code generation and hardware implementation.

This model shows part of the asymmetric digital subscriber line (ADSL) technology for transmitting data and multimedia information over telephone lines. It illustrates a downstream path

This model shows a straightforward way to perform passband modulation, by multiplying a modulated complex signal with a complex sine wave to perform frequency upconversion. In general, it

This model shows an orthogonal space-time block code (OSTBC) concatenated with trellis-coded modulation (TCM) for information transmission over a multiple-input multiple-output

Optimize the QPSK receiver modeled in QPSK Transmitter and Receiver example for HDL code generation and hardware implementation. The HDL-optimized model shows a QPSK receiver that

This model shows a communications system compliant with the U. S. MIL-STD-188-110A military standard. In particular, the model implements a full receiver that demodulates and outputs a

Use the HDL Optimized CRC Generator and CRC Detector library blocks and then configure these blocks to meet the IEEE® 802.11 standard [1].

Use basic morphological operators to extract information from a video stream. In this case, the model counts the number of staples in each video frame. Note that the focus and lighting change

Determine whether video frames are in focus by using the ratio of the high spatial frequency content to the low spatial frequency content within a region of interest (ROI). When this ratio is

Inspect the concentricity of both the core and the cladding in a cross-section of optical fiber. Concentricity is a measure of how centered the core is within the cladding.

Use a combination of basic morphological operators and blob analysis to extract information from a video stream. In this case, the example counts the number of E. Coli bacteria in each video

Track a person's face and hand using a color-based segmentation method.

Use color information to detect and track road edges set in primarily residential settings where lane markings may not be present. The Color-based Tracking example illustrates how to use

Track objects at a train station and to determine which ones remain stationary. Abandoned objects in public areas concern authorities since they might pose a security risk. Algorithms,

Detect and track road lane markers in a video sequence and notifies the driver if they are moving across a lane. The example illustrates how to use the Hough Transform, Hough Lines and Kalman

Detect and count cars in a video sequence using Gaussian mixture models (GMMs).

Implement a face detection and tracking algorithm in Simulink® by using a MATLAB® Function block. It closely follows the Face Detection and Tracking Using the KLT Algorithm MATLAB®

Detect and track cars in a video sequence using optical flow estimation.

Use sum of absolute differences (SAD) method for detecting motion in a video sequence. This example applies SAD independently to four quadrants of a video sequence. If motion is detected in a

Create an image processing system which can recognize and interpret a GTIN-13 barcode. The GTIN-13 barcode, formally known as EAN-13, is an international barcode standard. It is a superset

Use the 2-D normalized cross-correlation for pattern matching and target tracking.

Segment video in time. The algorithm in this example can be used to detect major changes in video streams, such as when a commercial begins and ends. It can be useful when editing video or when

Recognize traffic warning signs, such as Stop, Do Not Enter, and Yield, in a color video sequence.

Process surveillance video to select frames that contain motion. Security concerns mandate continuous monitoring of important locations using video cameras. To efficiently record,

Compress a video using motion compensation and discrete cosine transform (DCT) techniques. The example calculates motion vectors between successive frames and uses them to reduce

Use the From Video Device block provided by Image Acquisition Toolbox™ to acquire live image data from a Hamamatsu C8484 camera into Simulink®. The Prewitt method is applied to find the edges

Use the From Video Device block provided by Image Acquisition Toolbox™ to acquire live image data from a Point Grey Flea® 2 camera into Simulink®. The example uses the Computer Vision System

Create a mosaic from a video sequence. Video mosaicking is the process of stitching video frames together to form a comprehensive view of the scene. The resulting mosaic image is a compact

Remove the effect of camera motion from a video stream. In the first video frame, the model defines the target to track. In this case, it is the back of a car and the license plate. It also

Use the Hough Transform and Polyfit blocks to horizontally align text rotating in a video sequence. The techniques illustrated by this example can be used in video stabilization and optical

Filter a sinusoid with the Overlap-Add and Overlap-Save FFT methods using the Frequency-Domain FIR filter block.

Model analog-to-digital conversion using a sigma-delta algorithm implementation.

Simulate steady-state behavior of a fixed-point digital down converter for GSM (Global System for Mobile) baseband conversions. The example model uses blocks from Simulink® and the DSP

Uses the Dyadic Analysis Filter Bank and Dyadic Synthesis Filter Bank blocks to show both the perfect reconstruction property of wavelets and an application for noise reduction.

Push and pop elements from a queue using a Queue block with a system of selection switches.

Demonstrates how to generate HDL code for a discrete FIR filter with multiple input data streams.

Showcases a block that outputs the streaming power spectrum estimate of a time-domain input via Welch's method of averaged modified periodograms.

Estimate the group delay of a filter in Simulink. Group delay is defined as -d(phi(f))/d(f). To estimate the group delay of the filter extract the phase response and compute its negative

Perform high resolution spectral analysis by using an efficient polyphase filter bank sometimes referred to as a channelizer.

Use the Discrete Transfer Function Estimator block to estimate the magnitude and phase response of a continuous-time analog filter.

Generate HDL code for high throughput (Gigasamples per second, GSPS) Channelizer using Polyphase Filter Bank technique.

The FFT and IFFT HDL Optimized blocks and system objects support simulation and HDL code generation for many applications. They provide two architectures optimized for different use

Beamform signals received by an array of microphones to extract a desired speech signal in a noisy environment. This Simulink® example is based on the MATLAB® example

Use beamscan and minimum variance distortionless response (MVDR) techniques for direction of arrival (DOA) estimation in Simulink®. It is based on the MATLAB® example

Apply conventional and adaptive beamforming in Simulink® to a narrowband signal received by an antenna array. The signal model includes noise and interference. This example is based on the

Use Simulink® to suppress clutter and jammer interference from the received pulses of a monostatic radar. It illustrates how to model clutter and jammer interference as well as how to use the

Simulates a bistatic radar system with two targets. The transmitter and the receiver of a bistatic radar are not co-located and move along different paths.

Simulate a wideband radar system. A radar system is typically considered to be wideband when its bandwidth exceeds 5% of the system's center frequency. For this example, a bandwidth of 10%

In a radar system, the RF front end often plays an important role in defining the system performance. For example, because the RF front end is the first section in the receiver chain, the design

In radar operation, it is often necessary to adjust the operation mode based on the target return. This example shows how to model a radar that changes its pulse repetition frequency (PRF)

Model an end-to-end monostatic radar using Simulink®. A monostatic radar consists of a transmitter colocated with a receiver. The transmitter generates a pulse which hits the target and

How model of an automotive radar in Simulink for an adaptive cruise control (ACC) system, which is an important part of an advanced driver assistance system (ADAS). The example explores both

How to:

Simulate delay-based and lumped-element transmission lines using blocks in the RF Blockset™ Circuit Envelope library. The example is sequenced to examine circuit envelope and passband

This model shows how to simulate a key multi-discipline design problem from the Aerospace Defense industry sector.

This model shows the nonlinear effect of a RF Blockset™ Equivalent Baseband amplifier on a 16-QAM modulated signal.

Use blocks from the RF Blockset™ Circuit Envelope library to simulate a transmit/receive duplex filter and calculate frequency response curves from a broadband white-noise input. Blocks

Use the RF Blockset™ Circuit Envelope library to simulate the sensitivity performance of a direct conversion architecture with the following RF impairments:

Use two different options for modeling S-parameters with the RF Blockset™ Circuit Envelope library. Time-domain (rationalfit) technique creates an analytical rational model that

Model a digital video broadcasting system which includes phased array antennas. The baseband transmitter, receiver and channel are realized with Communication System Toolbox™. The RF

Set up a radar system simulation consisting of a transmitter, a channel with a target, and a receiver. For the Aerospace Defense industry, this is an important multi-discipline problem. RF

Use the RF Blockset™ Circuit Envelope library to simulate the performance of a Low IF architecture with the following RF impairments:

Use the RF Blockset™ Circuit Envelope library to test intermodulation distortion of an amplifier using two-carrier envelope analysis.

Use the RF Blockset™ Circuit Envelope library to calculate the image rejection ratio (IRR) for high-side-injection in Weaver and Hartley receivers. The Weaver receiver shows the effect of

Use Input Port and Output Port blocks of the RF Blockset™ Equivalent Baseband library to convert between dimensionless Simulink signals and equivalent-baseband signals.

This model shows the relationship between two signal representations in RF Blockset™ Circuit Envelope: complex baseband (envelope) signal and passband (time domain) signal. The step

Use the Model-Based Design methodology to overcome the challenge of exchanging specifications, design information, and verification models between multiple design teams working on a

Use the RF Blockset™ Circuit Envelope library to run a two-tone experiment that measures the second- and third-order intercept points of an amplifier. The model computes the intercept

Write your own nonlinear RF Blockset Circuit Envelope model in Simscape® language, build the custom library and use it in RF Blockset simulation.

This model shows how to use blocks from the RF Blockset™ Equivalent Baseband library to build cascaded RF systems.

This model shows three ways to use RF Blockset™ Equivalent Baseband library blocks and RF Toolbox™ objects to create filters.

Build a superheterodyne receiver and analyze the receiver's RF budget for gain, noise figure, and IP3 using the RF Budget Analyzer app. The receiver is a part of a transmitter-receiver

Use circuit envelope to calculate the steady-state frequency response curve for an LC bandpass filter built using blocks from the RF Blockset™ Circuit Envelope library. The first model

Use power ports and measure the signal power using the spectrum analyzer.

Use the RF Blockset™ Circuit Envelope library to measure the effect of thermal noise on the bit error rate (BER) of a communications system and to verify the result by comparing to a

Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a location from the following list:

See all countries