MATLAB Examples

Every variable in MATLAB® is an array that can hold many numbers. When you want to access selected elements of an array, use indexing.

Use array indexing to rasterize text into an existing image.

Example 1: addcd, show, reset

Based on "Finite Element Methods for flow problems" of Jean Donea and Antonio Huerta

F. Moisy, 9 july 2008. University Paris Sud.

Find the maximum value of a single variable in a data set using mapreduce. It demonstrates the simplest use of mapreduce since there is only one key and minimal computation.

The function NUM2WORDS converts a numeric scalar into a string with the number value given in English words, e.g. 1024 -> 'one thousand and twenty-four'. Optional arguments control the

If you have a set of N points on a cartesian plane, there will always exist an N-1th order polynomial of the form y = a_0 + a_1.x + a_2.x^2 + ... a_n-1.x^(n-1) which passes through all the points.

Welcome to this MATLAB Video tutorial. If you have never used MATLAB before, this demonstration will get you started and show you where to go to next to learn more.

This example was authored by the MathWorks community.

Utility from File Exchange

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

Create an animation of two growing lines. The animatedline function helps you to optimize line animations. It allows you to add new points to a line without redefining existing points.

Copyright 2017 The MathWorks, Inc.

Use mapreduce to carry out simple logistic regression using a single predictor. It demonstrates chaining multiple mapreduce calls to carry out an iterative algorithm. Since each

Compute the mean of a single variable in a data set using mapreduce. It demonstrates a simple use of mapreduce with one key, minimal computation, and an intermediate state (accumulating

This contribution presents a small tool to trace calls to methods and functions. There was no tracing tool for Matlab to find on the Internet and still isn't?

Visualize patterns in a large data set without having to load all of the observations into memory simultaneously. It demonstrates how to compute lower volume summaries of the data that are

Compute the mean by group in a data set using mapreduce. It demonstrates how to do computations on subgroups of data.

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

Copyright 2016 The MathWorks, Inc.

In this example we see how to use callback functions in the Parallel Computing Toolbox™ to notify us when a task has completed and to update graphics when task results are available. We also see

The Parallel Computing Toolbox™ enables us to execute our MATLAB® programs on a cluster of computers. In this example, we look at how to divide a large collection of MATLAB operations into

In this example, we look at two common cases when we might want to write a wrapper function for the Parallel Computing Toolbox™. Those wrapper functions will be our task functions and will

In this example, we look at how we can reduce the run time of our jobs in the Parallel Computing Toolbox™ by minimizing the network traffic. It is likely that the network bandwidth is severely

Change the behavior of the examples in the Parallel Computing Toolbox™. There are at least two versions of each example in the Parallel Computing Toolbox: a sequential version and a

Plays the card game of blackjack, also known as 21. We simulate a number of players that are independently playing thousands of hands at a time, and display payoff statistics. Simulating the

Use the parallel profiler. It is intended to be a quick-start guide to using the parallel profiler graphical user interface (GUI) and its basic commands. Links are provided to the other

Profile the implicit communication that occurs when using an unevenly distributed array.

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

Profile explicit communication to the nearest neighbor lab. It illustrates the use of labSend, labReceive, and labSendReceive, showing both the slow (incorrect) and the fast (optimal)

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:

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

Uses the Parallel Computing Toolbox™ to play the card game of blackjack, also known as 21. We simulate a number of players that are independently playing thousands of hands at a time, and

Solve an embarrassingly parallel problem with uneven work distribution using for drange. The for drange splits iterations equally. As a result it can do suboptimal load balancing, which is

Benchmarks the parfor construct by repeatedly playing the card game of blackjack, also known as 21. We use parfor to play the card game multiple times in parallel, varying the number of

How a simple, well-known mathematical problem, the Mandelbrot Set, can be expressed in MATLAB® code. Using Parallel Computing Toolbox™ this code is then adapted to make use of GPU hardware

Uses Parallel Computing Toolbox™ to play the card game of blackjack, also known as 21. We simulate a number of players that are independently playing thousands of hands at a time, and display

Perform a parameter sweep in parallel and plot progress during parallel computations. You can use a DataQueue to monitor results during computations on a parallel pool. You can also use a

Access a large dataset in the cloud and process it in a cloud cluster using MATLAB capabilities for big data.

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.

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

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

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

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

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

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

Work with a curve fit.

Perform linear and quadratic classification of Fisher iris data.

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

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 .

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,

Create a classification tree ensemble for the ionosphere data set, and use it to predict the classification of a radar return with average measurements.

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

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 .

Use a random subspace ensemble to increase the accuracy of classification. It also shows how to use cross validation to determine good parameters for both the weak learner template and the

Small, round blue-cell tumors (SRBCTs) belong to four distinct diagnostic categories. The categories have widely differing prognoses and treatment options, making it extremely

As for all discrete distributions, the cdf is a step function. The plot shows the discrete uniform cdf for N = 10.

You can also use ensembles of decision trees for classification. For this example, use ionosphere data with 351 observations and 34 real-valued predictors. The response variable is

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

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

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

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

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

Machine learning techniques are often used for financial analysis and decision-making tasks such as accurate forecasting, classification of risk, estimating probabilities of default,

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.

Clustering is a form of unsupervised learning technique. The purpose of clustering is to identify natural groupings of data from a large data set to produce a concise representation based on

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

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

Load flight data and estimate G forces during the flight.

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

Most PID tuning rules are based on the assumption that the plant can be approaximated by a first-order plus time delay system. This code explains why this assumption is valid and how to

Convert a discrete-time system to continuous time using d2c , and compares the results using two different interpolation methods.

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.

Absorbing time delays into frequency response data can cause undesirable phase wrapping at high frequencies.

To reduce the order of a model by pole-zero cancellation at the command line, use minreal .

Create a periodic random Gaussian input signal using idinput.

Bring United States Air Force (USAF) Digital DATCOM files into the MATLAB® environment using the Aerospace Toolbox™ software.

Most PID tuning rules are based on first-order plus time delay assumption of the plant hence cannot ensure the best control performance. Using mordern optimization techniques, it is

Convert a time delay in a discrete-time model to factors of 1/_z_.

Show how to set up a listener and callback for a change in price. Note that X_Trader is a 32-bit application and will only work with 32-bit Windows installations of MATLAB.

Lowpass filter an ECG signal that contains high frequency noise.

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

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

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

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 raised cosine (RRC) filter.

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

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

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

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

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

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

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

Use wavelets to analyze electrocardiogram (ECG) signals. ECG signals are frequently nonstationary meaning that their frequency content changes over time. These changes are the events of

Generate an Enhanced Physical Downlink Control Channel (EPDCCH) transmission using the LTE Toolbox™.

Provides visualization capabilities to see the effects of RF impairments and corrections in a satellite downlink. The link employs 16-QAM modulation in the presence of AWGN and uses a High

Demonstrates how to measure the Rank Indicator (RI) reporting performance using the LTE Toolbox™ under conformance test conditions as defined in TS36.101 Section 9.5.1.1 [ 1 ].

A digital communications system using QPSK modulation. In particular, this example illustrates methods to address real-world wireless communications issues like carrier frequency and

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 Toolbox™.

A method for digital communication with OFDM synchronization based upon the IEEE 802.11a standard. System objects from the Communications Toolbox are utilized to provide OFDM modulation

Copyright 2018 The MathWorks, Inc.

Create a South-polar Stereographic Azimuthal projection map extending from the South Pole to 20 degrees S, centered on longitude 150 degrees West. Include a value for the Origin property in

If manual comparison by a fingerprint expert is always done to say if two fingerprint images are coming from the same finger in critical cases, automated methods are widely used now.

Uses Lucas-Kanade method on two images and calculate the optical flow vector for moving objects in the image.

Human activity sensor data contains observations derived from sensor measurements taken from smartphones worn by people while doing different activities (walking, lying, sitting etc).

We'd like to read in locations of recent earthquakes from USGS website and plot them on an interactive map.

In this example, I will load an some historical data, earthquake hypocenters from the ISC-GEM Catalogue and see how we can work when the amount of data may be too large to fit into memory all at

Reduces the number of image colors.

ToR_LandSat8 has the following general form:

The iceflex_interp function performs spatial interpolation to find local "coefficients" of ice flexure using the model presented by David Vaughan's 1995 JGR paper, Tidal flexure at ice

Author: Rafal Kasztelanic

Combines a few built-in Matlab functions with some functions you'll find on the Mathworks File Exchange site.

David Young

We have data captured from a flight recorder in a small aircraft. Measurements were taken every 6 seconds, and include: * Timestamp * Exhaust Gas Temperature (EGT) * Cylinder Head

The ramp function plots the Radarsat Antarctic Mapping Project version 2 using Antarctic Mapping Tools for Matlab. RAMP data are described in full on the NSIDC website. If you use RAMP data,

Here's a quick and easy way to make maps of subglacial water accumulation using TopoToolbox. This example uses Bedmap2 surface and bed elevations for for Thwaites Glacier.

This function interpolates values of a georeferenced tiff file, given lat/lon coordinates or map x/y locations corresponding to the map projection associated with the tiff file. This

The gravity_data function returns gridded Antarctic gravity anomaly data from Scheinert et al., 2016. See the Data Citation section below for information about this dataset.

The smithlakes function plots 124 ICESat-detected active subglacial Antarctic lakes identified in a paper by Smith et al. For details of the underlying data, read the Smith paper and data

This function returns a logical array describing the landness of any given lat/lon arrays. Requires Matlab's Mapping Toolbox.

This function reads a sub region of a geotiff or geojp2 image.

Demonstrates the use of a Bitalino to acquire data into MATLAB and to process the raw ADC data to measure heart rate and to visualize some ECG measurements.

Control the motion of a Sphero using the Sphero Connectivity Package

How the Sphero Connectivity Package can be used to connect to a Sphero device and perform basic operations on the hardware, such as change the LED color, calibrate the orientation of the robot

Sphero is not listed under available devices when creating the sphero object, or the following error is received:

Describes the Simulink library for the Sphero Connectivity package, and how the blocks from the library can be used to control a Sphero.

Use CAN channels to transmit and receive CAN messages. It uses MathWorks Virtual CAN channels connected in a loopback configuration.

Log and replay CAN messages using MathWorks Virtual CAN channels in Simulink®. You can update this model to connect to supported hardware on your system.

Create, receive and process messages using information stored in CAN database files. This example uses the CAN database file, demoVNT_CANdbFiles.dbc.

Uses MathWorks Virtual CAN channels to set up periodic transmit and reception of CAN messages, using Simulink®. The Virtual channels are connected in a loopback configuration.

Use the automated CAN message transmit features of Vehicle Network Toolbox™ to send messages on event. It uses MathWorks Virtual CAN channels connected in a loopback configuration. As this

Configure and use a callback function to receive and process messages received from a CAN channel. It uses MathWorks Virtual CAN channels connected in a loopback configuration.

Use CAN message filters to allow only messages that contain specified identifiers to pass through a channel. It uses MathWorks Virtual CAN channels connected in a loopback configuration.

Set up CAN communication between host-side CAN Vector blocks and target models. This example uses:

Use Vehicle Network Toolbox™ with the InitialTimestamp CAN channel property to work with relative and absolute timestamps for CAN messages. It also uses MathWorks Virtual CAN channels

Use the automated CAN message transmit features of Vehicle Network Toolbox™ to send periodic messages. It uses MathWorks Virtual CAN channels connected in a loopback configuration. As

Use Vehicle Network Toolbox™ to implement a Controller Area Network (CAN) in a remote manipulator arm using Simulink®. The CAN messages used are defined in the CAN database file,

Uses MathWorks Virtual CAN FD channels to set up transmission and reception of CAN FD messages, using Simulink®. The Virtual channels are connected in a loopback configuration.

Use CAN FD channels to transmit and receive CAN FD messages. It uses MathWorks Virtual CAN channels connected in a loopback configuration.

Uses Vehicle Network Toolbox to implement a distributed Electronic Control Unit (ECU) network on CAN for an automobile using Simulink®. The CAN messages used are defined in the CAN database

Log and replay CAN FD messages using MathWorks Virtual CAN FD channels in Simulink®. You can update this model to connect to supported hardware on your system.

Use Vehicle Network Toolbox™ with J1939 to create and manage J1939 parameter groups using information stored in CAN database files. This example uses the CAN database file, J1939.dbc.

Use Vehicle Network Toolbox™ with J1939 to create and use J1939 channels to transmit and receive parameter groups on a network. This example uses the CAN database file, J1939.dbc. It also

Use XCP connections to create and use dynamic data acquisition lists. It uses a freely available XCP slave simulator from Vector and Vector virtual CAN channels. For access to virtual

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.

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

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

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

Conduct the Ljung-Box Q-test for autocorrelation.

This demo is an introduction to using MATLAB to develop and test a simple trading strategy using an exponential moving average.

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

This demo extends work done in AlgoTradingDemo1.m and adds an RSI technical indicator to the mix. Copyright 2010, The MathWorks, Inc. All rights reserved.

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.

In AlgoTradingDemo3.m we saw how to add two signals together to get improved results using evolutionary learning. In this demo we'll use extend the approach to three signals: MA, RSI, and

Estimate a seasonal ARIMA model:

In AlgoTradingDemo2.m we saw how to add two signals together to get improved results. In this demo we'll use evolutionary learning (genetic algorithm) to select our signals and the logic

This script will demonstrate some simple examples related to creating, routing and managing orders from MATLAB via Bloomberg EMSX.

DISCLAIMER: THE SAMPLE FILES ENCLOSED IN THIS DOWNLOAD ARE FOR ILLUSTRATION PURPOSES ONLY. USE THE INFORMATION CONTAINED IN THIS DOWNLOAD AT YOUR OWN RISK.

Use arima to specify a multiplicative seasonal ARIMA model (for monthly data) with no constant term.

Specify a composite conditional mean and variance model using arima .

Conduct a likelihood ratio test to choose the number of lags in a GARCH model.

Calculate the required inputs for conducting a Lagrange multiplier (LM) test with lmtest . The LM test compares the fit of a restricted model against an unrestricted model by testing whether

Check whether a linear time series is a unit root process in several ways. You can assess unit root nonstationarity statistically, visually, and algebraically.

This demo shows how to profile your code to find the performance bottlenecks, or areas for improvement, as well as the capability to generate C-Code from MATLAB.

In this script we will produce a number of visuals for the simulated rates when using HW model.

Conduct Engle's ARCH test for conditional heteroscedasticity.

Place the UserDefinedConstants directory on your MATLAB search path

In this example, you will use the parameter estimation capabilities of SimBiology™ to calculate F, the bioavailability, of the drug ondansetron. You will calculate F by fitting a model of

Construct a simple model with two species (A and B) and a reaction. The reaction is A -> B , which follows the mass action kinetics with the forward rate parameter k . Hence the rate of change is $

Perform a Monte Carlo simulation of a pharmacokinetic/pharmacodynamic (PK/PD) model for an antibacterial agent. This example is adapted from Katsube et al. [1] This example also shows how

Use the sbioconsmoiety function to find conserved quantities in a SimBiology® model.

Simulate and analyze a model in SimBiology® using a physiologically based model of the glucose-insulin system in normal and diabetic humans.

Build, simulate and analyze a model in SimBiology® using a pathway taken from the literature.

Make ensemble runs and how to analyze the generated data in SimBiology®.

Build and simulate a model using the SSA stochastic solver.

Perform a parameter scan by simulating a model multiple times, each time varying the value of a parameter.

Build a simple nonlinear mixed-effects model from clinical pharmacokinetic data.

Configure sbiofit to perform a hybrid optimization by first running the global solver particleswarm , followed by another minimization function, fmincon .

Correctly build a SimBiology® model that contains discontinuities.

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:

Change the amount of a species similar to a first-order reaction using the first-order rate rule. For example, suppose the species x decays exponentially. The rate of change of species x is:

Build and simulate a model using the SSA stochastic solver and the Explicit Tau-Leaping solver.

Create a rate rule where a species from one reaction can determine the rate of another reaction if it is in the second reaction rate equation. Similarly, a species from a reaction can determine

Deploy a graphical application that simulates a SimBiology model. The example model is the Lotka-Volterra reaction system as described by Gillespie [1], which can be interpreted as a

An analysis of the origin and diffusion of the SARS epidemic. It is based on the discussion of viral phylogeny presented in Chapter 7 of "Introduction to Computational Genomics. A Case

Construct phylogenetic trees from multiple strains of the HIV and SIV viruses.

How the analysis of synonymous and nonsynonymous mutations at the nucleotide level can suggest patterns of molecular adaptation in the genome of HIV-1. This example is based on the

The interoperability between MATLAB® and Bioperl - passing arguments from MATLAB to Perl scripts and pulling BLAST search data back to MATLAB.

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

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.

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

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

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

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

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®

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

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

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

Work with MATLAB® HDL Coder™ projects to generate HDL from MATLAB designs.

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

Perform a design-level area optimization in HDL Coder by converting constant multipliers into shifts and adds using canonical signed digit (CSD) techniques.

Generate modular HDL code from MATLAB® code containing functions.

This demo introduces user to the new and enhanced bitwise operators provided in Fixed Point toolbox in R2007b. These functions are supported by Embedded MATLAB block for both software and

Generate a MATLAB Function block from a MATLAB® design for system simulation, code generation, and FPGA programming in Simulink®.

Work with MATLAB® HDL Coder™ projects.

Generate HDL code from MATLAB® code modeling transfer data between transmit and receive FIFO.

Debug a Zynq design using HDL Coder™ and Embedded Coder® features.

Convert a finite impulse-response (FIR) filter to fixed point by separating the fixed-point type specification from the algorithm code.

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

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

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

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

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

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

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

Illustrates a functional approach to creating a report generator based on the DOM API. It uses the DOM API to create a MATLAB function, rptmagic, that generates a PDF, HTML, or a Microsoft Word

Illustrates an object-oriented approach to creating a report generator based on the DOM API. It uses the DOM API to create pair of MATLAB classes, MagicSquareReport and

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

The MATLAB Report Generator's report generation API supports creation of finders that search data containers for specified objects and return the results in reportable form. Finders

Arrange images side by side on a page.

The Report Generator's PowerPoint API allows you to create MATLAB applications that present results as Microsoft PowerPoint presentations. This examples shows the use of the API to create

Determines the minimum arrival delay using a large set of flight data that is stored in a database.

Create a DatabaseDatastore object for accessing collections of data stored in a relational database. After creating a DatabaseDatastore object, you can preview data, read data in chunks,

Determines the mean arrival delay of a large set of flight data that is stored in a database using MapReduce. You can access large data sets using a DatabaseDatastore object with Database

Move data between MATLAB® and the MATLAB® interface to SQLite. Suppose that you have product data that you want to import into MATLAB®. You can load this data quickly into a SQLite database

Import data from a database into MATLAB®, perform calculations on the data, and export the results to a database table.

Import Boolean data from a database table into the MATLAB® workspace. MATLAB® imports Boolean data from databases into the MATLAB® workspace as data type logical. This data has values of

Retrieve database information using the connection object and the sqlfind function.

Import data from a table in a Microsoft® Access™ database into the MATLAB® workspace using the sqlread function. The example then shows how to use an SQL script to import data from an SQL query

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

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

Choose a web site 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 web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Contact your local office