MATLAB Examples

Plot more than one line by passing multiple x,y pairs to the plot function.

Determine the minimum and maximum data points on a graph and add text descriptions next to these values.

Export a cell array to a text file, using the fprintf function.

To create two-dimensional line plots, use the plot function. For example, plot the value of the sine function from 0 to :

Create a graph in a new figure window, instead of plotting into the current figure.

Three-dimensional plots typically display a surface defined by a function in two variables, z = f(x,y) .

Change the grid line style using the GridLineStyle and MinorGridLineStyle axes properties. Line style options are a solid line, '-', a dotted line, ':', a dashed line, '--', and a

Plot only the data points by omitting the line style option from the line specification.

Anonymous functions require that you explicitly specify the input arguments as you would for a standard function, separating multiple inputs with commas. For example, this function

You can display multiple plots in different subregions of the same window using the subplot function.

Use a loop to create a figure containing four subplots. In each subplot, plot a sine wave with different frequencies based on the loop variable k. Add a title to each subplot that includes the

Display major and minor grid lines on a graph. Major grid lines align with the tick mark locations. Minor grid lines appear between the tick marks.

MATLAB is an abbreviation for "matrix laboratory." While other programming languages mostly work with numbers one at a time, MATLAB® is designed to operate primarily on whole matrices and

Build a digital voltmeter using MATLAB® Support Package for Raspberry Pi® Hardware.

Export a table to a text file, using the writetable function.

MATLAB® provides a large number of functions that perform computational tasks. Functions are equivalent to subroutines or methods in other programming languages.

Create a figure containing multiple axes using the subplot function. The syntax, subplot(m,n,p), divides the figure into an m-by-n grid with an axes in the pth grid location. The grids are

The alpha shape of a set of points is a generalization of the convex hull and a subgraph of the Delaunay triangulation. That is, the convex hull is just one type of alpha shape, and the full family

The convex hull of a set of points in N-D space is the smallest convex region enclosing all points in the set. If you think of a 2-D set of points as pegs in a peg board, the convex hull of that set

Create a line plot and add a title and axis labels to the graph. Display a superscript in the title using the ^ character. The ^ character modifies the character immediately following it.

Copyright 2013 The MathWorks, Inc.Published with MATLAB® R2013a

Use scatteredInterpolant to interpolate a scattered sampling of the peaks function.

Access and modify table properties for variable units, descriptions and names. You also can edit these property values using the Variables Editor.

Is derived from Gerard Schuster's MATLAB example and book Seismic Interferometry

These are the files used in the webinar on Feb. 23, 2011. This file provides a brief description of the contents of the demo files and the steps needed to download the public data sources for use

This file demonstrates how to use the Par class object to time the execution time of each PARFOR loop. Here are the steps.

In parallel computing, communication between workers extracts a heavy cost and therefore a rule of thumb is to keep processing local. But certain array operations, such as averaging over a

This demo calculates returns the risk-return relationship in the stock portfolio that is optimal in the mean-variance sense. covMat and expRet are the covariance and mean returns of a

This example was authored by the MathWorks community.

A MATLAB application from the field of systems biology was chosen for experimental runs. The application was created using SimBiology® which extends MATLAB® with functionality for

Looks at how we can benchmark the solving of a linear system on the GPU. The MATLAB® code to solve for x in A*x = b is very simple. Most frequently, we use matrix left division, also known as

Benchmark solving a linear system on a cluster. The MATLAB® code to solve for x in A*x = b is very simple. Most frequently, one uses matrix left division, also known as mldivide or the backslash

In this example, we show how to benchmark an application using independent jobs on the cluster, and we analyze the results in some detail. In particular, we:

Runs a MATLAB® benchmark that has been modified for the Parallel Computing Toolbox™ and executes it on the client machine. Fluctuations of 5 or 10 percent in the measured times of repeated

Looks at why it is so hard to give a concrete answer to the question "How will my (parallel) application perform on my multi-core machine or on my cluster?" The answer most commonly given is "It

Runs a MATLAB® benchmark that has been modified for Parallel Computing Toolbox™. We execute the benchmark on our workers to determine the relative speeds of the machines on our distributed

How arrayfun can be used to run a MATLAB® function natively on the GPU. When the MATLAB function contains many element-wise operations, arrayfun can provide improved performance when

Use pagefun to improve the performance of applying a large number of independent rotations and translations to objects in a 3-D environment. This is typical of a range of problems which

Uses Conway's "Game of Life" to demonstrate how stencil operations can be performed using a GPU.

Uses Parallel Computing Toolbox™ to perform a two-dimensional Fast Fourier Transform (FFT) on a GPU. The two-dimensional Fourier transform is used in optics to calculate far-field

Measure some of the key performance characteristics of a GPU.

Uses Parallel Computing Toolbox™ to perform a Fast Fourier Transform (FFT) on a GPU. A common use of FFTs is to find the frequency components of a signal buried in a noisy time-domain signal.

Fit an exponential model to data using the fit function.

Use anovan to fit models where a factor's levels represent a random selection from a larger (infinite) set of possible levels.

Use functional derivatives in the Symbolic Math Toolbox™ using the example of the wave equation. The wave equation for a string fixed at its ends is solved using functional derivatives. A

Use the fit function to fit a Gaussian model to data.

Fit and compare polynomials up to sixth degree using Curve Fitting Toolbox, fitting some census data. It also shows how to fit a single-term exponential equation and compare this to the

Generate a nonlinear classifier with Gaussian kernel function. First, generate one class of points inside the unit disk in two dimensions, and another class of points in the annulus from

Solve the wave equation using command-line functions. It solves the equation with boundary conditions u = 0 at the left and right sides, and at the top and bottom. The initial conditions are

Use the fit function to fit polynomials to data. The steps fit and plot polynomial curves and a surface, specify fit options, return goodness of fit statistics, calculate predictions, and

Remove outliers when curve fitting programmatically, using the 'Exclude' name/value pair argument with the fit or fitoptions functions. You can plot excluded data by supplying an Exclude

Compute and plot the pdf of a Poisson distribution with parameter lambda = 5.

Use the fit function to fit power series models to data.

In this example, use a database of 1985 car imports with 205 observations, 25 predictors, and 1 response, which is insurance risk rating, or "symboling." The first 15 variables are numeric

Work with a curve fit.

Use Cook's Distance to determine the outliers in the data.

Load and modify data using Model-Based Calibration Toolbox™ command-line interface. Data can be loaded from files (Excel® files, MATLAB® files, text files) and from the MATLAB®

Use copulafit to calibrate copulas with data. To generate data Xsim with a distribution "just like" (in terms of marginal distributions and correlations) the distribution of data in the

Perform linear and quadratic classification of Fisher iris data.

Similar to the bootstrap is the jackknife, which uses resampling to estimate the bias of a sample statistic. Sometimes it is also used to estimate standard error of the sample statistic. The

Fit a function to data using lsqcurvefit together with MultiStart.

Perform N-way ANOVA on car data with mileage and other information on 406 cars made between 1970 and 1982.

Find the indices of the three nearest observations in X to each observation in Y with respect to the chi-square distance. This distance metric is used in correspondence analysis,

Plot the pdf of a bivariate Student's t distribution. You can use this distribution for a higher number of dimensions as well, although visualization is not easy.

Compute and plot the pdf using four different values for the parameter r, the desired number of successes: .1, 1, 3, and 6. In each case, the probability of success p is .5.

Explores more in-depth interaction with the Gazebo® Simulator from MATLAB®. Topics include creating simple models, adding links and joints to models, connecting models together, and

Use the command line features of anfis on a chaotic time-series prediction example.

Implement a steady, viscous flow through an insulated, constant-area duct using the Aerospace Toolbox™ software. This flow is also called Fanno line flow.

Create a flight animation for a trajectory using a FlightGear Animation object.

Visualize aircraft takeoff and chase helicopter with the virtual reality animation object. In this example, you can use the Aero.VirtualRealityAnimation object to set up a virtual

Demonstrates how to control a robot to follow a desired path using a Robot Simulator. The example uses the Pure Pursuit path following controller to drive a simulated robot along a

The primary mechanism for ROS nodes to exchange data is to send and receive messages. Messages are transmitted on a topic and each topic has a unique name in the ROS network. If a node wants to

Set up the Gazebo® simulator engine. This example prepares you for further exploration with Gazebo and also for exploration with a simulated TurtleBot®.

Use the Aerospace Toolbox™ functions to determine heat transfer and mass flow rate in a ramjet combustion chamber.

This case study illustrates Kalman filter design and simulation. Both steady-state and time-varying Kalman filters are considered.

How FCM clustering works using quasi-random two-dimensional data.

Visualize simulated versus actual flight trajectories with the animation object (Aero.Animation) while showing some of the animation object functionality. In this example, you can use

Interact with the Gazebo® Simulator from MATLAB®. It shows how to pause the Gazebo simulation, read the physics properties, and retrieve information about objects in the Gazebo world.

Estimate a model that is parameterized by poles, zeros, and gains. The example requires Control System Toolbox™ software.

Demonstrates how to compute an obstacle free path between two locations on a given map using the Probabilistic Roadmap (PRM) path planner. PRM path planner constructs a roadmap in the free

Model objects can represent individual components of a control architecture, such as the plant, actuators, sensors, or controllers. You can connect model objects to build aggregate

Use the method of characteristics and Prandtl-Meyer flow theory to solve a problem in supersonic flow involving expansions. Solve for the flow field downstream of the exit of a supersonic

Load flight data and estimate G forces during the flight.

Messages are the primary container for exchanging data in ROS. Topics (see docid:robotics_examples.example-ROSPublishAndSubscribeExample) and services (see

Visualize contour plots of the calculated values for the Earth's magnetic field using World Magnetic Model 2015 (WMM-2015) overlaid on maps of the Earth. The Mapping Toolbox™ software is

Calculate the required compressor power in a supersonic wind tunnel.

Apply the genfis2 function to model the relationship between the number of automobile trips generated from an area and the area's demographics. Demographic and trip data are from 100

To illustrate the value of fuzzy logic, examine both linear and fuzzy approaches to the following problem:

This examples shows you how to filter an ECG signal that has high-freqquency noise, and remove the noise by low-pass filtering.

Multiple-Input-Multiple-Output (MIMO) systems, which use multiple antennas at the transmitter and receiver ends of a wireless communication system. MIMO systems are increasingly

Many measurements involve data collected asynchronously by multiple sensors. If you want to integrate the signals and study them in tandem, you have to synchronize them. Use xcorr for that

Simulate a basic communication system in which the signal is first QPSK modulated and then subjected to Orthogonal Frequency Division Multiplexing. The signal is then passed through an

Design lowpass filters. The example highlights some of the most commonly used command-line tools in the DSP System Toolbox. Alternatively, you can use the Filter Builder app to implement

Obtain nonparametric power spectral density (PSD) estimates equivalent to the periodogram using fft. The examples show you how to properly scale the output of fft for even-length inputs,

Use the Communications System Toolbox to visualize signal behavior through the use of eye diagrams and scatter plots. The example uses a QPSK signal which is passed through a square-root

Plot a Gray-coded 8-QAM constellation.

Use System objects to do streaming signal processing in MATLAB. The signals are read in and processed frame by frame (or block by block) in each processing loop. You can control the size of each

Plot a PSK constellation having 16 points.

How multiple Channel State Information (CSI) processes provide the network with feedback for Coordinated Multipoint (CoMP) operation. In this example User Equipment (UE) data is

Design and implement an FIR filter using two command line functions, fir1 and designfilt, and the interactive Filter Designer app.

Implement a speech compression technique known as Linear Prediction Coding (LPC) using DSP System Toolbox™ functionality available at the MATLAB® command line.

Filter a 16-QAM signal using a pair of square root raised cosine matched filters. Plot the eye diagram and scatter plot of the signal. After passing the signal through an AWGN channel,

Design lowpass FIR filters. Many of the concepts presented here can be extended to other responses such as highpass, bandpass, etc.

Compute the time-domain response of a simple bandpass filter:

Use the Complementary Cumulative Distribution Function (CCDF) System object to measure the probability of a signal's instantaneous power being greater than a specified level over its

The example performs Huffman encoding and decoding using a source whose alphabet has three symbols. Notice that the huffmanenco and huffmandeco functions use the dictionary created by

Use the Least Mean Square (LMS) algorithm to subtract noise from an input signal. The LMS adaptive filter uses the reference signal on the Input port and the desired signal on the Desired port

Calculate the cascaded gain, noise figure, and 3rd order intercept (IP3) of a chain of RF stages. Each stage is represented by a frequency independent "black box", specified with it's own

How an over-the-air LTE waveform can be generated and analyzed using the LTE System Toolbox™, the Instrument Control Toolbox™ and an Agilent Technologies® RF signal generator and

Demonstrates how to measure the Channel Quality Indicator (CQI) reporting performance using the LTE System Toolbox™ under conformance test conditions as defined in TS36.101 Section

You want to differentiate a signal without increasing the noise power. MATLAB®'s function diff amplifies the noise, and the resulting inaccuracy worsens for higher derivatives. To fix

Automatically detect and track a face using feature points. The approach in this example keeps track of the face even when the person tilts his or her head, or moves toward or away from the

Automatically create a panorama using feature based image registration techniques.

Use color space conversion to determine if an L*a*b* value is in the RGB gamut. The set of colors that can be represented using a particular color space is called its gamut . Some L*a*b* color

Automatically detect and track a face in a live video stream, using the KLT algorithm.

Load point cloud data.

Detect regions in an image that contain text. This is a common task performed on unstructured scenes. Unstructured scenes are images that contain undetermined or random scenarios. For

Use a bag of features approach for image category classification. This technique is also often referred to as bag of words. Visual image categorization is a process of assigning a category

Detect a particular object in a cluttered scene, given a reference image of the object.

Calculate geographic areas for vector data in polygon format using the areaint function. areaint performs a numerical integration using Green's Theorem for the area on a surface enclosed

Use the ocr function from the Computer Vision System Toolbox™ to perform Optical Character Recognition.

Track pedestrians using a camera mounted in a moving car.

Automatically detect and track a face.

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

Perform automatic detection and motion-based tracking of moving objects in a video from a stationary camera.

Evaluate the accuracy of camera parameters estimated using the cameraCalibrator app or the estimateCameraParameters function.

Combine multiple point clouds to reconstruct a 3-D scene using Iterative Closest Point (ICP) algorithm.

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

Automatically determine the geometric transformation between a pair of images. When one image is distorted relative to another by rotation and scale, use detectSURFFeatures and

Create a histogram for an image using the imhist function. An image histogram is a chart that shows the distribution of intensities in an indexed or grayscale image. The imhist function

Detect people in video taken with a calibrated stereo camera and determine their distances from the camera.

Trace the border of an object in a binary image using bwtraceboundary . Then, using bwboundaries , the example traces the borders of all the objects in the image.

Use the 2-D normalized cross-correlation for pattern matching and target tracking. The example uses predefined or user specified target and number of similar targets to be tracked. The

Detect road lane markers in a video stream and how to highlight the lane in which the vehicle is driven. This information can be used to detect an unintended departure from the lane and issue a

Acquire angular position data using an incremental rotary encoder and a multifunction data acquisition (DAQ) device with the Data Acquisition Toolbox quadrature encoder measurement

Acquire and display data from an accelerometer attached to a vehicle driven under uneven road conditions.

Acquire analog input data using non-blocking commands. This allows you to continue working in the MATLAB command window during the acquisition. This is called background acquisition. Use

Acquire bridge circuit voltage ratio data, then compute and plot strain values.

MATLAB® is able to communicate with instruments and devices at the protocol layer as well as the physical layer. This example uses the I2C feature of the Instrument Control Toolbox to

Acquire and display sound pressure data from a PCB® IEPE array microphone, Model 130E20. The sensor is recording sound pressure generated by a tuning fork at Middle C (261.626 Hz) frequency.

Measure frequency to determine rate of flow of fluid using a flow sensor. The sensor generates a digital signal with frequency correlates to the rate of flow of fluid.

Discover devices visible to MATLAB® and get information about channel and measurement types available in those devices.

Acquire data from a National Instruments device available to MATLAB® from the command line using the Session based interface.

Will show you how to synchronously generate and acquire voltage data (at a rate of 300 KHz). You will use the session-based interface with Digilent Analog Discovery hardware.

Control a stepper motor using digital output ports.

Set up a continuous audio acquisition. This example uses a two-channel microphone.

Measure the width of an active high pulse. A sensor is used to measure distance from a point. The width of the pulse correlates to the actual distance measured.

Determine the rate of rotation of an Anaheim Automation motor controller by counting the number of rising edges in the signal. The controller returns hall effect pulses (square waves) that

Use the function generator to generate an arbitrary waveform function at a rate of 1 KHz and record data at the same time, using an analog input channel. The output voltage-range of the

Read in data from thermocouples using NI devices that support thermocouple measurements using the Session based interface.

Generate signals on an analog output current channel for a NI device capable of current output using the Session based interface.

Use the function generator channel to generate an 1 KHz sinusoidal waveform function and record data at the same time, using analog inputs. The output voltage-range of the outgoing signal is

Generate analog output data using non-blocking commands. This allows you to continue working in the MATLAB command window during the generation. This is called background generation. Use

Generate data using a National Instruments device available to MATLAB® using the Session based interface.

how to acquire temperature data from a Resistive temperature device (RTD) and display the readings. The device is attached inside a PC case to monitor the internal temperature changes.

Save data acquired in the background to a file. Use the session-based interface and acquires analog input data using non-blocking commands. If you are using the legacy interface, refer to

Set up a continuous audio generation. This example uses, but does not require, a 5.1 channel sound system.

Compute the sample autocorrelation function (ACF) and partial autocorrelation function (PACF) to qualitatively assess autocorrelation.

Specify an AR(p) model with constant term equal to zero. Use name-value syntax to specify a model that differs from the default model.

The bolling function in Financial Toolbox™ software produces a Bollinger band chart using all the closing prices in an IBM® stock price matrix. A Bollinger band chart plots actual data along

Prepare exogenous data for several seemingly unrelated regression (SUR) analyses. The response and exogenous series are random paths from a standard Gaussian distribution.

Inspect a squared residual series for autocorrelation by plotting the sample autocorrelation function (ACF) and partial autocorrelation function (PACF). Then, conduct a Ljung-Box

Assess whether a time series is a random walk. It uses market data for daily returns of stocks and cash (money market) from the period January 1, 2000 to November 7, 2005.

Use the Box-Jenkins methodology to select an ARIMA model. The time series is the log quarterly Australian Consumer Price Index (CPI) measured from 1972 and 1991.

Estimate long-term trend using a symmetric moving average function. This is a convolution that you can implement using conv. The time series is monthly international airline passenger

Compute and plot the impulse response function for an autoregressive (AR) model. The AR(p) model is given by

Use Akaike Information Criterion (AIC) to select the nonseasonal autoregressive and moving average lag polynomial degrees for a regression model with ARMA errors.

To illustrate assigning property values, consider specifying the AR(2) model

Simulate sample paths from a stationary AR(2) process without specifying presample observations.

Do goodness of fit checks. Residual diagnostic plots help verify model assumptions, and cross-validation prediction checks help assess predictive performance. The time series is

Implement the capital asset pricing model (CAPM) using the Econometrics Toolbox™ multivariate time series framework.

Plot the impulse response function for an autoregressive moving average (ARMA) model. The ARMA(p, q) model is given by

Conduct the Ljung-Box Q-test for autocorrelation.

The Engle-Granger method has several limitations. First of all, it identifies only a single cointegrating relation, among what might be many such relations. This requires one of the

Estimate a multivariate time series model that contains lagged endogenous and exogenous variables, and how to simulate responses. The response series are the quarterly:

Calculate and plot the impulse response function for a moving average (MA) model. The MA(q) model is given by

Specify a GARCH model with a Student's t innovation distribution.

Test a univariate time series for a unit root. It uses wages data (1900-1970) in the manufacturing sector. The series is in the Nelson-Plosser data set.

Specify a multiplicative seasonal ARIMA model (for quarterly data) with known parameter values. You can use such a fully specified model as an input to simulate or forecast.

Simulate sample paths from a stationary MA(12) process without specifying presample observations.

Several ways of visualizing the results of functional metagenomic analyses. The discussion is based on two studies focusing on the metagenomic analysis of the human distal gut microbiome.

Retrieve gene expression data series (GSE) from the NCBI Gene Expression Omnibus (GEO) and perform basic analysis on the expression profiles.

Programmatically search and retrieve data from NCBI's Entrez databases using NCBI's Entrez Utilities (E-Utilities) with urlread and urlwrite.

A number of ways to look for patterns in gene expression profiles. This example uses data from the microarray study of gene expression in yeast by DeRisi, et al. 1997.

Analyze Illumina BeadChip gene expression summary data using MATLAB® and Bioinformatics Toolbox™ functions.

A secondary structure prediction method that uses a feed-forward neural network and the functionality available with the Neural Network Toolbox™.

Construct a phylogenetic trees from mtDNA sequences for the Hominidae taxa (also known as pongidae). This family embraces the gorillas, chimpanzees, orangutans and the humans.

Use the Global Optimization Toolbox with the Bioinformatics Toolbox™ to optimize the search for features to classify mass spectrometry (SELDI) data.

Classify mass spectrometry data and shows some statistical tools that can be used to look for potential disease markers and proteomic pattern diagnostics.

Collect sequence data from GenBank® and stores it in a Microsoft® Access™ database, using the Bioinformatics Toolbox™. Many of the computations done in MATLAB® on biological data can be

Identify differentially expressed genes from microarray data and uses Gene Ontology to determine significant biological functions that are associated to the down- and up-regulated

Apply the mapreduce function implemented in MATLAB® to Next Generation Sequencing Data by using custom map and reduce functions. Specifically, it shows how to assess the base quality for

Increase the amount or concentration of a species by a constant value using the zero-order rate rule. For example, suppose species x increases by a constant rate k. The rate of change is:

Illustrates how to use the rnafold and rnaplot functions to predict and plot the secondary structure of an RNA sequence.

How Bioinformatics Toolbox™ can be used to work with and vizualize graphs.

Various ways to explore and visualize raw microarray data. The example uses microarray data from a study of gene expression in mouse brains [1].

Test RNA-Seq data for differentially expressed genes using a negative binomial model.

Calculate Ka/Ks ratios for eight genes in the H5N1 and H2N3 virus genomes, and perform a phylogenetic analysis on the HA gene from H5N1 virus isolated from chickens across Africa and Asia. For

Improve the quality of raw mass spectrometry data. In particular, this example shows the typical data flow for dealing with protein surface-enhanced laser desorption/ionization-time of

Manipulate, preprocess and visualize data from Liquid Chromatography coupled with Mass Spectrometry (LC/MS). These large and high dimensional data sets are extensively utilized in

Illustrates a simple metagenomic analysis on a sample data set from the Sargasso Sea. It requires the taxonomy information included in the files gi_taxid_prot.dmp, names.dmp and

Workflows for the analysis of gene expression data with the attractor metagene algorithm. Gene expression data is available for many model organisms and disease conditions. This example

How HMM profiles are used to characterize protein families. Profile analysis is a key tool in bioinformatics. The common pairwise comparison methods are usually not sensitive and specific

Generate a standalone C library from MATLAB code that implements a simple Sobel filter that performs edge detection on images. The example also shows how to generate and test a MEX function in

The recommended workflow for generating C code from a MATLAB function using the 'codegen' command. These are the steps: 1. Add the %#codegen directive to the MATLAB function to indicate that

Generate C code for a MATLAB Kalman filter function,'kalmanfilter', which estimates the position of a moving object based on past noisy measurements. It also shows how to generate a MEX

Generate HDL code from a MATLAB® design that does image enhancement using histogram equalization.

Use the HDL Coder™ to generate a custom HDL IP core which blinks LEDs on the Arrow® SoCKit® evaluation kit, and shows how to use Embedded Coder® to generate C code that runs on the ARM® processor

Compute square root using a CORDIC kernel algorithm in MATLAB®. CORDIC-based algorithms are critical to many embedded applications, including motor controls, navigation, signal

Generate a standalone C library from MATLAB code that reads a file from disk using the standard C functions fopen/fread/fclose. To call these C functions, the MATLAB code uses the

Generate a Xilinx ® System Generator for DSP Black Box block from a MATLAB® HDL design.

HDL code generation from a floating-point MATLAB® design that is not ready for code generation in two steps. First we use float2fixed conversion process to generate a lookup table based

Generate HDL code from a MATLAB® design that implements an LMS filter. It also shows how to design a testbench that implements noise cancellation using this filter.

Generate a MEX function from a simple MATLAB function using the 'codegen' command. You can use 'codegen' to check that your MATLAB code is suitable for code generation and, in many cases, to

Generate HDL code from a MATLAB® design implementing the adaptive median filter algorithm suited for HDL code generation.

Use MATLAB® HDL Workflow Advisor to generate a custom HDL IP core which blinks LEDs on FPGA board. The generated IP core can be used on Xilinx® Zynq® platform, or on any Xilinx FPGA with

Use HDL Workflow Advisor to generate a custom HDL IP core which blinks LEDs on FPGA board. The generated IP core can be used on Xilinx® Zynq® platform, or on any Xilinx FPGA with MicroBlaze

Generate HDL code from MATLAB® design implementing an bisection algorithm to calculate the square root of a number in fixed point notation.

Convert a textbook version of the Fast Fourier Transform (FFT) algorithm into fixed-point MATLAB® code.

Use the HDL Coder™ to generate a custom HDL IP core which blinks LEDs on the Xilinx® Zynq® ZC702 evaluation kit, and shows how to use Embedded Coder® to generate C code that runs on the ARM®

Generate a MEX function and C source code from MATLAB code that performs portfolio optimization using the Black Litterman approach.

Use both CORDIC-based and lookup table-based algorithms provided by the Fixed-Point Designer™ to approximate the MATLAB® sine (SIN) and cosine (COS) functions. Efficient fixed-point

These examples are using Einstein's General Relativity to calculate geodesics in curved space-time.

Generate HDL code from a MATLAB® design implementing a RGB2YUV conversion.

Use the CORDIC algorithm, polynomial approximation, and lookup table approaches to calculate the fixed-point, four quadrant inverse tangent. These implementations are approximations

Accelerate fixed-point algorithms using fiaccel function. You generate a MEX function from MATLAB® code, run the generated MEX function, and compare the execution speed with MATLAB code

Demonstrates building and validating a short term electricity load forecasting model with MATLAB. The models take into account multiple sources of information including temperatures

One of the more common trading strategies within the commodities trading community is trend following. Trend following is an absolute momentum strategy in that it assumes that a particular

Another popular form of trading strategy that is often employed by commodities traders and analysts is cross-sectional momentum, which seeks to measure and rank momentum across multiple

Demonstrates building and validating a short term electricity price forecasting model with MATLAB using Neural Networks. The models take into account multiple sources of information

It is often a good idea to verify the performance of a backtested trading strategy with a chunk of market data that it has previously not been tested on. At the beginning of this webinar, we had

We will be analysing data from a continuous process of electrolytic copper production at Boliden AB (Skelleftehamn, Sweden).

Importing data from a variety of sources and aligning / cleaning up the data consumes a significant portion of an analyst workflow. It can be challenging to align and synchronize data from

Once a trading strategy has been identified and refined by the analyst, the next steps in the workflow involve backtesting the strategy and generating multiple analytics to capture

Ideas for trading strategies can very often be generated by visual exploration of the price data. MATLAB's interactive plotting tools enable analysts to quickly visualize and explore

While backtesting a trading strategy, the analyst is often required to determine the optimal values of various strategy parameters and measure the sensitivity of the strategy's profits to

Demonstrates an alternate model for building relationships between historical weather and load data to build and test a short term load forecasting. The model used is a set of aggregated

Illustrates how to set the width of the page margins of a Microsoft Word report.

Illustrates a functional approach to creating a report with template-based report (DOM) objects. This approach uses a MATLAB function to generate a report. It contrasts with an

Illustrates an object-oriented approach for creating reports with template-based (DOM) report objects. With this approach, you derive a report class from mlreportgen.dom.Document or

The DOM API supports, but does not require, use of templates to generate reports. As this example illustrates, you can use the API to create scripts that generate and format content without

Use MATLAB® Report Generator™ to perform an XML comparison of two XML text files, and view the differences in the resulting report.

The PPT API does require the use of templates to generate presentations. As this example illustrates, you can use the API to create scripts that generate PowerPoint presentations from

Create a DatabaseDatastore object and analyze large data using a tall table. This example determines the minimum arrival delay using a large set of flight data that is stored in a database.

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