MATLAB Examples

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

Use the MATLAB® Support Package for Arduino® Hardware to control a HC-SR04 ultrasonic ranging module capable of measuring distances in the 2cm to 400cm range.

This example was authored by the MathWorks community.

This scripts demonstrates the capabilities of the heatmap visualization function.

Use the MATLAB® Support Package for Arduino® Hardware to communicate with DS18B20 temperature sensor and DS2431 EEPROM

This function creates axes in tiled positions. It is similar to subplot, but uses the entire figure window with no space between subplots. The name smplot is used to invoke "Small Multiples"

I'm positive that some simple UML-diagrams could help us organizing our Matlab code. See UmlAsSketch by Martin Fowler.

Mark Text -> change Font -> change Background color

Capture the orientation of the mobile device. We define the orientation as a combination of three angular quantities: Azimuth, pitch, and roll. The three quantities are defined based on the

The eof function gives eigenmode maps of variability and corresponding principal component time series for spatiotemporal data analysis. It is designed specifically for 3D matricies of

Use the MATLAB® Support Package for Arduino® Hardware to control a three axis LSM303 accelerometer and magnetometer.

Word error rate (WER) is a measure (metric) of the performance of an automatic speech recognition, machine translation etc.

This function evaluates a simple sigmoid function along x such that

Collect and then display latitude and longitude data on a satellite map image.

The function COLORNAMES matches the input RGB values or color name strings to the closest colors from the selected palette. COLORNAMES returns the same outputs whether matching names or

Use the MATLAB® Support Package for Arduino® Hardware to control a capacitive sensor built with foil connected between two digital pins on Arduino.

Use the MATLAB® Support Package for Arduino® Hardware to control a three-axis L3G gyroscope that measures the angular rates of rotation about the roll(X), pitch(Y) and yaw(Z) axes.

The following script is a tutorial on the methodology of what I call "Shape Prescriptive Modeling". Its a tool for modeling a function of a single variable

Copyright (c) 2008 Gabriel Peyre

This tutorial demonstrates the use of the Optical Fibre Toolbox for calculation of the three-layer (core-cladding-surrounding) fibres. First, the specification of such structures is

StoichTools comprises a set of Matlab functions for doing stoichiometric analysis. These functions parse standard chemical notation for a variety of stoichiometric calculations

You can create a PDF or HTML version of this MATLAB file by choosing opening it in the MATLAB Editor and choosing "File > Publish ..."

The cmocean function returns perceptually-uniform colormaps generated by Kristen Thyng. A detailed description of the cmocean project is available at http://matplotlib.org/cmocean.

The function NEXTNAME returns a file or folder name, incrementing a number at the end of the name to ensure that the returned name is not currently used.

From the results of an impressively thorough survey by Randall Munroe of XKCD, this function returns the RGB color triplets for just about any color name you can think of. In keeping with

The following initial definitions are made (in the order presented below):

Minimal xml file generated from a single test case.

An industrial structure is modeled as 2-DOF system as shown in the following figure. Determine the lateral displacement, base shear and base moment of the structure due to El-Centro, 1940

Bubbleplot creates 2D and 3D scatter plots of multivariate data. Up to 7 dimensions of data can be visualized by using marker color, shape, size and text annotations to convey information

The following example compares different numerical methods to simulate the response of a SDOF subjected to forced harmonic forces in the time domain. The exact solution is in addition used

How to create a curve with lower and upper bounds in MATLAB®.

There are plenty of direct and iterative methods to solve a linear algebraic system of equations. Using Cramer's rule, one can easily obtain the solution for small systems by hand. However,

M2uml 1.1 includes new feaures

This tutorial is adapted from one published by Sparkfun here and licensed under Creative Commons Attribution Share-Alike 3.0 Unported License.

This paper discusses several approaches for calling shared libraries from Simulink models.

Use the rotmanTrader functions to connect to and trade through Rotman Interactive Trader (RIT). RIT must be installed on your computer along with the Excel® RTD Links. For more information

There are an awful lot of polar datasets out there, and each one seems to be packaged in a different format. Antarctic Mapping Tools is a collection of functions intended to streamline the

JUnit xml file generated from multiple tests. One of each status type.

A signal received by a ULA with M = 20 elements and spacing contains both a signal of interest at with an array SNR of 20 dB and thermal sensor noise with unit power . The signal of interest is an

Treemaps display data using the relative areas of nested rectangles. See http://en.wikipedia.org/wiki/Treemapping for more information.

This script demonstrates using the function clickableLegend to generate interactive legends that hide or highlight objects in the axes when clicked or when the corresponding legend item

In this application, MATLAB® is used to wirelessly control an LED using two XBee Series 2 modules. A mini photocell is used to wirelessly monitor the state of the LED. By integrating MATLAB

How to customize polar axes settings in a plot in MATLAB®.

This document will help you get set up and running with the roatmanTrader functionality for connecting to Rotman Interactive Trader.

This function plots a polynomial fit to scattered x,y data. This function can be used to easily add a linear trend line or other polynomial fit to a data plot.

The gif function is the simplest way to make gifs. Simply call

A "unit" statement accepts a number and a unit name and converts these to international units (SI). There are just seven different units in the international system of units. These are:

File compares MODIS Mosaic of Antarctica, Landsat 8, Landsat Image Mosaic of Antarctica, and Radarsat Antarctic Mapping Project images of Antarctica. Images are plotted in Matlab using

Authors: Caterina Samela (caterina.samela@unibas.it); Salvatore Manfreda

A boost converter is a circuit that steps up voltage (while stepping down current) from its input (a DC supply like a battery) to its output. It usually contains at least one switch, a diode , and

The measures_displacement function predicts the horizontal location of a parcel of ice after a specified amount of time, based on InSAR surface velocities. This function does not account

SVD_LAPACK computes the singular value decomposition of a matrix by calling LAPACK subroutines: ZGESVD or ZGESDD.

The ibcso function plots International Bathymetric Chart of the Southern Ocean (IBCSO) digital bathymetric model dat using using Antarctic Mapping Tools. IBCSO data are described in full

This script compares using the functions size, length, and storing the value of an array before entering a for loop. This is important because of the time wasted calling size() or length() in a

Tprintf provides a more intuitive interface to fprintf for writing tabular data to a text file. tprintf(filespec,format,A1,...,An) creates a tabular text file by writing the columns of

The anomaly function plots line data with different colors of shading filling the area between the curve and a reference value. This is a common way of displaying anomaly time series such as

Binind2latlon converts binned index values of a sinusoidal grid to geocoordinates.

By Jarek Tuszynski

Below is a brief overview of the Bedmap2 Toolbox for Matlab. Information about the Bedmap2 project can be found here and here.

We can estimate the time of sunrise and sunset for any location on the earth if we know the latitude, longitude, and UTC offset for that location. To estimate sunrise and sunset for any day of the

The following examples illustrate the application of the function polarPcolor

These functions convert RGB color triplets to hexadecimal format, or hexadecimal format to RGB color triplets.

Find the Darcy friction factor for pipe flow using the Colebrook equation.

The argodata function downloads Argo profile data and imports it into your Matlab workspace for easy workin' with.

By Jarek Tuszynski (jaroslaw.w.tuszynski@leidos.com)

C = multic(A,B)

Connect to and stream data from Rotman Interactive Trader (RIT) using rotmanTrader functionality. RIT must be installed on your computer along with the Excel RTD Links. For more

This function creates color-scaled text labels.

The spiral function makes a spiral plot that shows the annual nature and long-term trend of a time series.

Uses Lucas-Kanade method on two images and calculate the optical flow field.

In part one and part two of this series of blog posts I went through the process of reading voltages from a network of XBee® modules, building and testing my wireless network of temperature

Set output methods

In this example a nonlinear vector equation is solved for various values of the Newton-Raphson algorithm parameters. The vector equation to be solved is comprised from 2 nonlinear

(one of constant-unconditional-intensity, first-order, exponential-decay type)

In part one of this series of blog posts I went through the process of reading voltages from a network of XBee® modules, and building and testing my wireless network of temperature sensors. In

Solving a Sudoku puzzle in MATLAB may not be a challenge, but to solve it quickly is not so easy. More than 20 Sudoku solvers have been submitted in MATLAB File Exchange. Most of them use

Section 5.5.1 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

The key building block of the parametized matrix package (pmpack) is the expansion of a vector function in an orthogonal polynomial basis. This demonstration shows how we work with these

The present example illustrates the calculation of the Obukhov length using the eddy-covariance method. The input is made of time series of the along-wind and vertical wind velocity

The data are room impulse responses measured in a control room type space in home environment.

Gaston Julia studied complex dynamics in the early 20th century, and part of his work examined the behavior when a rational function is iterated. In other words, the result of calling some

(C) 2013 Matthew harker and Paul O'Leary Institute for Automation University of Leoben A-8700 Leoben Austria

This script demonstrates the use of Optical Fibre Toolbox functions for calculation of two-layer fibres modes.

Analyzing Weather Data from an Arduino-based Weather Station Connected to ThingSpeak, an Internet of Things (IoT) Data Aggregator

Circleps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Section 4.1 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

The data is a measurement from a class room The documentation of the measurement is found at http://legacy.spa.aalto.fi/projects/poririrs/

Presents the generation of a turbulent wind field along a horizontal line, assimilated to a bridge deck. The flow is assumed homogeneous and stationary along the deck.

In part one, part two, and part three of this series of blog post I went through the process of reading voltages from a network of XBee® modules, building and testing my wireless network of

The newcolorbar function creates a new set of invisible axes matching the size and extents of the current axes. This allows a second colormap to be used in such a way that it is perceived to be two

The average leverage (h) is by definition in [0 1]. Weak smoothing occurs if h is close to 1, while over-smoothing appears when h is near 0. Upper and lower bounds for h are given to avoid under- or

Hslcolormap is a tool that helps you create nice looking colormaps in hue-saturation-lightness space. You can use this to create colormaps that have a progressive change in lightness.

The antbounds_data function returns the coordinates of line data in the MEaSURES Antarctic Boundaries for IPY 2007-2009 from Satellite Radar dataset Version 2.

A simple coil geometry is the Archimedean spiral. Its windings are in one plane, and they all have the same distance.

How to set axes positions in a plot in MATLAB®.

Xyz2grid converts regularly-spaced columnated x,y,z data into gridded data.

Treats images from the images of test case A4 of 3rd PIV challenge (Stanislas, Ref. [6]). To visualize more easily results, the four parts of the image are treated separately.

The wind spectra for a neutral and unstable atmospheric stratification are computed following the model proposed by Højstrup [1]. The model of Højstrup aims to describe the wind spectra in

The algorithm proposed by Wilczak et al. [1] is used to correct the tilt angles of one anemometer.

How to create a heatmap chart in MATLAB®.

This function plots borders of nations or US states. This function does not require Matlab's Mapping Toolbox. Data are compiled from 2013 US Census Bureau 500k data and a

In this function to solve Equation of Motions for different modes, Newmark Linear Method has been used. By modifying inputs F & ft, you can analyze the structute for either earthquake

Uv2vxvy is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Demonstrates the simplest possible use of PIVsuite for obtaining the velocity field from a pair of images. For running this example, you need Matlab 2013a or higher.

There are four plotting routines that have been adapted for plotting variables with units. These are

The argofiles returns urls of ARGO NetCDF files within specified geographic and temporal limits. This function is intended for use with the argodata function.

Sodb_profile plots oceanographic profiles along a given transect.

Measures_data imports MEaSUREs Antarctic surface velocity or grounding line data into your current Matlab workspace.

The dirPlus function recursively collects a list of files or subdirectories from a folder tree, allowing you to specify the selection criteria for how the list is collected and formatted.

The bedmap2 function uses simple commands to plot Bedmap2 data. If you have Matlab's Mapping Toolbox, data are plotted in georeferenced coordinates. If you do not have the Mapping Toolbox,

This script demonstrates the application of constrained basis functions to the solution of the simplest Sturm-Liouville problem, This script is very simular to the script

The polysym class is a symbolic manipulation package that helps users to put equations in a form that Bertini can read. It is similar in behavior to the sym class in the Symbolic Math Toolbox,

The antbounds function plots line data from the line data in the MEaSURES Antarctic Boundaries for IPY 2007-2009 from Satellite Radar dataset Version 2.

This function rounds values to multiples of a fraction.

This file shows a few examples of how to use Arctic Mapping Tools for Matlab.

An XPath package started shipping as part of Java 5, so we can use it from MATLAB. This is a simple example.

Find the balanced reaction for the complete combuston of octane to carbon dioxide and water.

SEE ALSO : ASK_MOD, BPSK_MOD, FSK_MOD

The BertiniLab package is designed to convert numerical MATLAB® functions into text files that can be used as input to the numerical algebraic geometry package Bertini. This package can

Uses datefig from the file exchange and a mex version of NREL's C/C++ source for SOLPOS.

The ibcso_data function returns IBCSO bathymetric data and corresponding geographic or polar stereographic cartesian coordinates. IBCSO data are described in full on the IBCSO website

Section 7.3.2 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

The calculation of the eigen-frequencies and mode shapes of a suspension bridge using the present Matlab code is based on the theory of continuous beam and the theory of shallow cables. The

We examine a linear elliptic partial differential equation in two spatial dimensions with homogeneous Dirichlet boundary conditions and parameterized scalar coefficients. For , let

In view of the stunning success of new lines of argument in the political debate, it is high time to free also science and engineering from the fetters of a small-minded rationale. Stimulated

Contourfps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

The wind field is now simulated along a vertical line (e.g. a wind mast). I use the input file INPUT_MAST.txt with 20 nodes created along a vertical line, for alitudes ranging from 10 to 90 m.

We illustrate the use of tapers with the spatial matched filter for the extraction of a radar signal in the presence of a jamming interference source using a ULA with M = 20 elements with

Mixed beam/truss model.

Example 5.3 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

The vertical eigen-frequencies and mode-shapes of the Lysefjord Bridge, based on data obtained from [1,2,3], are computed using the formulation proposed by [4]. The results are compared

This function plots vertical or horizontal errorbars. Error bars may be symmetic or asymmetric about their data points.

You can use the accelerometer in your mobile device to count steps in MATLAB.

How to create a graph plot in MATLAB®.

Coorous Mohtadi, MathWorks, 2012

In this example, we explore the use of diagonal loading of the sample correlation matrix to control the sidelobe levels of the SMI adaptive beamformer using the same set of parameters as in

This is an illustration of the generation of a non-gaussian random process based on a gaussian one. This method applies well for low skewness, and high kurtosis.

This script is supplemental material to the paper:

The data are room impulse responses from left and right channel of a a home theater system.

In this example, we study the SMI adaptive beamformer and the loss associated with the number of snapshots used for training. SMI adaptive beamformers are produced with sample supports of K =

The acceleration, velocity and displacement data of the earthquake can be downloaded from here:

The great Roger Miller once sang, As long as there's a hill there's a valley / Long as there's a valley then the river can flow free / As long as there's a Sun there's a shadow / As long as there's a

There are just two statements which comprise the operations needed to assign units to variables and convert a unit to an equivalent unit of measure. Units are assigned to variables with a

SEE ALSO : ASK_MOD, FSK_MOD, QPSK_MOD

The dtu10mdt_interp function loads and interpolates the DTU10MDT mean dynamic topography dataset.

How to customize axes settings in a plot in MATLAB®.

Entropy_triangle is a function that implements two tools to analyze the behavior of multiple-class, or multi-class, classifiers by means of entropic measures on their confusion matrix or

See Gleich and Constantine, Random Alpha PageRank, for details about this method. PageRank is a method to evaluate the importance of nodes in a directed graph. On the graph, we follow a random

The vertical bridge response is now computed for different values of the mean wind velocity, and compared to displacements from a time domain simulation.

Create a scatter plot of cars organised by weight, MPG, price and make

As a test, randn generates a matrix that is not symmetric nor is it at all positive definite in general.

This code demonstrates a simulation of a spiral galaxy in MATLAB using the density wave theory.

The functions in this plugin for Antarctic Mapping Tools for Matlab are intended to simplify the process of Antarctic data masking. We use the the MEaSURES Antarctic Boundaries for IPY

Beam with main axis z, and cross section is symmetric to axis x and y

Demonstrates the advanced usage of PIVsuite for obtaining the velocity field from a pair of images. Contrary to the previous example (example_02_Image_pair_standard.m), additional

Here I'll generate a sequence of magic squares, then compute the permanent for each. I'll also show the time required.

The cbarrow function places triangle-shaped endmembers on colorbars to indicate that data values exist beyond the extents of the values shown in the colorbar.

This function predicts displacements from solid earth tides and is a wrapper function for Dennis Milbert's solid.exe program, which I believe is a wrapper for an adapted version of Dehant's

VARIABLES: Z - array of element numbers contained in the material Ratios - array of element ratios in the material MatStr - string representation of the material

Using the list of species from HW_03, verify that the columns of the stoichiometric matrix are in the null space of the atomic matrix.

Psgrid is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

URLFILTER is designed to make it easy to scrape data from websites.

Formaldehyde is produced on an industrial scale by the incomplete oxidation of methanol in air. Principle by-products include formic acid, carbon dioxide, and carbon monoxide. Find a set

Example 12.1 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

An electric vehicle is proposed in which each of the rear wheels is powered by a permament magnet Direct Current (DC) motor. Engineers have to decide what motor to place in their vehicles which

Jacobs et al. did a nice job of combining several data sets in their 2013 JGR Oceans paper titled "Getz Ice Shelf melting response to changes in ocean forcing." Figure 4 of their paper may look a

Due to various limitations, PIVsuite works mostly only on a single core of the computer. To improve performance when treating large sets of PIV images, it is advantageous to run several

This case is essentially the same as example 07: The test case A1 from 3rd PIV challenge [ref. 6] is treated. Mean and rms velocities are computed, velocity PDF is determined and wavenumber

A spherical isosurface

Dan Frey

This function returns Bedmap2 data and corresponding geographic or polar stereographic coordinates.

It is well-documented that the Golden Ratio is observed in the angular geometry of seeds in sunflowers, coneflowers and pinecones, as well as other plants and natural phenomena.

The sodb_inpolygon returns measured (not gridded) data for all SODB stations within a specified polygon.

How to create a directed graph plot in MATLAB®.

The different possibilities for this special type of wind rose are summarized below

The rtopo2 function plots Antarctic data from RTopo-2 (Schaffer et al. 2016, see reference below) in projected polar stereographic coordinates.

This function downsamples 1D or 3D data to monthly, yearly, hourly, minutely, or secondly data. This function was originally designed to create monthly mean time series from daily

Determine whether inputs are axis handles.

The position of the sun is an afterthought for most, unless it is blinding you on your commute home. However, the position of the sun remains incredibly important, even in the modern age. While

The phasemap function returns or sets a cyclic colormap with a constant lightness profile appropriate for plotting phase. The phasemap function is a break-out colormap from the cmocean

Copyright (c) 2015, Mehmet E. Yavuz All rights reserved.

Arcticseaice plots daily Arctic sea ice concentration from Nimbus-7 SMMR and DMSP SSM/I-SSMIS Passive Microwave Data or Near-Real-Time DMSP SSMIS Daily Polar Gridded Sea Ice

Stephen Goldrick (c), September, 2014 Newcastle University/Manchester University/ Perceptive Engineering

The sodb function plots Southern Ocean Database data on maps or polar stereographic cartesian coordinates. Station locations are plotted as markers and gridded data are plotted as pcolor

Coded by Ilias Konsoulas, 3 Aug. 2016. Code provided for educational purposes only. All rights reserved.

Reshape_daily reshapes daily time series from 1D to 3D or from 3D to 1D. 3D time series coordinates correspond to DAYSxMONTHSxYEARS and will always be 31x12xNUMBEROFYEARS. Missing data

The isopenocean function returns logical true for any locations that are neither grounded nor ice shelf according to MEaSURES Antarctic Boundaries for IPY 2007-2009 from Satellite Radar,

Section 7.1 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, and Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

The flowline function predicts ice flowpath(s) based on MEaSUREs InSAR-derived surface velocities.

Read data from a SAS dataset

Created by Brighton Ancelin

Add nodes by specifying two arrays, one for each coordinate direction.

A good programming practice is to make sure that you leave your program environment in a clean state that does not interfere with any other program code. For example, you might want to

SEE ALSO : ASK_MOD, BPSK_MOD, QPSK_MOD

Prefixes can be used with defined unit names to expand the scope of unit names. You can, for example, create kilometers from meters by adding the prefix "kilo".

Ll2ps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Plot3ps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

By Bill McKeeman

Contourps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

This function plots Antarctic surface velocity or grounding line data in a coordinate system that requires Matlab's Mapping Toolbox. If you don't have Matlab's Mapping Toolbox, or even if

This file is called by indpensim_run It contains the ordinary differential equations for the IndPenSim I/O structure : dy = indpensim_ode(t,y,FLAG,inp1);

Using the default values to make a horizontal line through the origin

Plotps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Inset_unproj is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

The outlineashelf function outlines the ice shelf 'shelf' on a map of Antarctica.

The ibcso_interp function interpolates bed elevations from the International Bathymetric Chart of the Southern Ocean (IBCSO) digital bathymetric model. IBCSO data are described in full

This function temporarily prints z values corresponding to clicked points on a surface or image. If multiple surfaces or images exist in the same axes, clickz first looks for surfaces and

From this post on the MATLAB Graphics blog .

Crossovers is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Section 5.4 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

This script is presented here as part of many of them to achieve HSDPT displacements, strains and stresses solution. Particularly, this theory is used to treat all sides simply supported

By default, MATLAB's high level plotting commands create the necessary graphics objects so that the user does not have to. For robust use, create and specify graphics objects to avoid

Creates a batch structure with a given time duration. A batch is a collection of channels. Channels hold the time history for a state/manipulated variable. They also contain a description,

The phasewrap function wraps values to the range -pi to pi or -180 to 180.

The slope2 function returns magnitudes of slope of a surface.

The conversion constants are contained within the "define" method in the "convConstant" object. Each constant is part of a series of case statements from one large switch statement. Here is

The measures_interp interpolates MEaSUREs ice surface velocity data at any location(s), along a path, or onto a new grid.

Pspath is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Example 1.1 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

Example 1.9 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

We are loading acceleration data made of 288 time series assumed to be acceleration histories of a suspension bridge, recorded at mid-span. Only the natural frequency for the vertical DOF of

How to create a polar histogram in MATLAB®.

The data are room impulse responses measured in a living room. Sakari Tervo & Jukka Pätynen, Aalto University, 2016 Sakari.Tervo@aalto.fi and Jukka.Patynen@aalto.fi Copyleft

This function searches the USGS website for low-resolution Landsat 8 images of specified path and row number and plots the most recent image in georeferenced coordinates.

SEE ALSO : BPSK_MOD, FSK_MOD, QPSK_MOD

How to create a categorical histogram plot in MATLAB®.

The modismoa function plots Moderate Resolution Imaging Spectroradiometer (MODIS) Mosaic of Antarctica (MOA) images, grounding lines and coastlines. Plotted data are high-pass 1.

PMPack contains all sorts of helpful routines for evaluating and computing univariate and multivariate quadrature rules.

Freeboard2thickness is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

The scatstat1 function returns statistical values of all points within a given radius of each value. This is similar to taking a moving mean, but points do not have to be equally spaced, nor do x

Add sensor noise to outputs after simulation can also be added throughout batch by including in ode loop and also can be applied to other variables T,pH,O2.. X.DO2.y = X.DO2.y +

The wind field is now simulated on a circle defined in the vertical plane (yz) normal to the flow. The function windSim2 is therefore used with two input files:

Grainsize_interp returns MODIS MOA grain sizes interpolated to any Antarctic locations(s).

The Chaos Game is a mathematical method used to create a sequence of points iteratively using a simple set of rules. In the Chaos game we start with a random point, use the rules to generate each

Modismoaps initializes a MODIS Mosaic of Antarctica (MOA) image or adds a MODIS MOA to an existing map. This function does NOT require Matlab's Mapping Toolbox. It also does NOT hijack the

Many directed graph, or digraph, applications drop the vertex labels to focus on computations of the Adjacency Matrix, referring to the vertices only by their indices. The digraph class

C2XYZ returns the x and y coordinates of contours in a contour matrix and their corresponding z values. C is the contour matrix given by the contour function.

Open a MATLAB file

The istidal function returns logical true for everything seaward of the landward limit of flexure (including open ocean and ice shelves) detected by InSAR according to MEaSURES Antarctic

This function returns Bedmap2 data interpolated to a point, line, or grid.

No coupling is introduced here, to keep calculations simple.

The discrete orthogonal polynomial toolbox (dopBOX) supports two dirrerent mechanisms for defining and generating constrained polynomials.

Section 7.2 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

Often in processing data, you have the problem of 4-5 files of data and you need concatenate all those files together. An elegant and easy way to handle this is with cell arrays. Other ways

Possible actions are:

This demo constructs and solves a simple parameterized matrix equation with a parameterized matrix of size 2x2. Given , consider the functions and defined on that satisfy

(a) Adapted pattern. (b) Principal cuts at target azimuth and Doppler.

Simple PID controller in incremental form. The derivative component is applied only to the output. Controller also checks for control signal saturation. Integral and derivative time

The fullfig function creates a full-screen figure.

Example 4.2 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

The measuresps function plots Antarctic ice surface speed as an imagesc plot in polar stereographic coordinates (meters, true lat 71 S) or velocity vectors as a quiver plot.

The bamberdem_interp function interpolates the Bamber et al. surface elevation DEM to any geo- or polar stereographic coordinates.

The sodb_interp interpolates Southern Ocean Database gridded data to any arbitrary geolocation(s).

Example 9.1 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

The rtopo2_interp function interpolates data from RTopo-2 (Schaffer et al. 2016, see reference below).

Ideally we would not need to rely on the MATLAB clear command. All of our variables would be scoped to the correct workspace. However particularly in interactive use or dealing with other

ROT_DSVD2X2 computes the real rotation matrices to obtain the singular value decomposition of a 2-by-2 real matrix.

The list can be stored. As long as you can recognise yours, you can remind yourself, while another user would have to guess without having prior knowledge.

This script demonstrates the generation of a particular solution and the determination of a set of homogeneously constrained basis functions which fulfil constraints. The particular

Runs IndPensim

Loads data from an industrial batch XLS sheet

An analysis of a compound shows it to be 63.94 mass% Carbon, 7.15 mass% Hydrogen, and the rest (28.91%) is Oxygen. What is the Hill Notation for this compound?

Vxvy2uv is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

The cryosat2_interp function interpolates the Helm et al. CryoSat-2 surface elevation DEM to any geo- or polar stereographic coordinates.

Reshape from Matrix to Vector for Scatter Plot

Demonstrates the simplest possible treatment of a sequence of PIV images using PIVsuite. These images shows a turbulent flow in a channel below a set of injections nozzles. Images were

Section 1.1.5 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

Coded by Ilias Konsoulas, 16 Dec. 2014. Code provided for educational purposes only. All rights reserved.

The InfiniiumWaveform Toolbox lets you easily modify, in Matlab, data acquired on the scope, and then load the results back onto the scope. This demo starts with a .mat file saved by the scope,

This problem uses a board game call Mastermind to introduce ideas about experimentation and computational thinking. In this game, in any given round of play, one player serves as the

This function plots daily Antarctic sea ice concentration from Nimbus-7 SMMR and DMSP SSM/I-SSMIS Passive Microwave Data or Near-Real-Time DMSP SSMIS Daily Polar Gridded Sea Ice

Write numeric data to a SAS dataset

To demonstrate the optimum beamformer, we consider a scenario in which there are three interference sources and compare it to a conventional beamformer (spatial matched filter). The array

This case is essentially the same as example 07: The test case A2 from 3rd PIV challenge [ref. 6] is treated. Mean and rms velocities are computed, velocity PDF is determined and wavenumber

Open the current working directory

How to create an line plot from a parametric function in MATLAB®.

The test case A3 from 3rd PIV challenge [ref. 6] is treated. Mean and rms velocities are computed, velocity PDF is determined and wavenumber spectra is calculated; these results can be

Thickness2freeboard is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

This function returns a blueish-greenish-orangey-yellowish color map which mimics, but does not exactly match the default parula color map introduced in Matlab R2014b.

This function plots a 2D profile of ice, water, and rock elevations along any lat,lon path in the Antarctic.

The bedhead function returns static pressure head at an ice sheet base in units of meters freshwater equivalent. This function calculates only a simple first-order approximation and does

Example 8.11 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

The basins function outlines Antarctic drainage basins on a map. This function is provided as a plugin to the Antarctic Mapping Tools package.

Graticuleps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

The isgrounded function returns logical true wherever there is grounded Antarctic ice according to MEaSURES Antarctic Boundaries for IPY 2007-2009 from Satellite Radar, Version 2.

Function cfeval calculates cash flows of fixed-income portfolios and structured products, given a quasi-symbolic, Matlab-syntax, typically recursive description of principal and

This function uses strcmp or strcmpi to return indices of a list of strings matching an input string. If no matches are found, close matches are suggested.

We will find the equilibrium states for a single-domain magnet with cubic anisotropy in zero field. The magnetization has a fixed magnitude, so it can be represented by a unit vector $

Pcolorps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

The rtopo2_data function loads data from RTopo-2 (Schaffer et al. 2016, see reference below).

The phasebar function places a circular donunt-shaped colorbar for phase from -pi to pi or -180 degrees to 180 degrees.

Basinsps outlines Antarctic ice drainage basins identified by Zwally et al. 2012. This is a polar stereographic implementation of the basins function. Matlab's Mapping Toolbox is not

Demonstrates the standard usage of PIVsuite for obtaining the velocity field from a pair of images. Contrary to the previous example (example_01_Image_pair_simple.m), common

Copyright 2010, Bill McKeeman, Dartmouth College

Dist2mask returns the distance in kilometers from given datapoints to any mask type (grounded, iceshelf, etc.) according to MEaSURES Antarctic Boundaries for IPY 2007-2009 from

ROT_SVD2X2 computes the complex rotation matrices to obtain the singular value decomposition of a 2-by-2 complex matrix.

Author: Shalin Mehta (c) 2011. shalin.mehta@gmail.com

The heatflux_interp function returns basal geothermal heat flux from the Community Ice Sheet Model (CISM).

First, the objective here is to find all of the negative real parts of the roots of a given polynomial with parameters. There is no restricition on the number of parameters, but for practical

Example 6.1 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

By: Roche de Guzman, Ph.D.

This function scales data and axis limits after data have been plotted. This may be helpful if you've plotted several data sets then decided, "the y axis labels should be in nanometers instead

Scatterps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Vector handling The result of these commands depends on the symbolic engine. In R2012b with Maple as the symbolic engine, y is a column vector. In R2013a and later with MuPAD, y is a row vector.

Implementation of a simple numerical schemes for the heat equation.

The labelshelves function simply labels ice shelves on an Antarctic polar stereographic (ps71) map. Ice shelf names are from the MEaSURES Antarctic Boundaries for IPY 2007-2009 from

The filesize function returns the size of a file as a variable or prints it in the command line.

Steuerberechnung im Jahr (2005-2015)

The function dopGenConstrained has the possability of placing constraints at points which are nodes in the basis functions, i.e. at points where the polynomials are nor evaluated. This can

This demonstration shows the possability of placing constraints outside the range of the support of the basis functions. Such problems occure when solving Sturm-Liouville problems.

Scalebarps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Given a URL read the table and return it with a cell of tables format.

Example 1: addcd, show, reset

Ps2ll is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Surfps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Section 7.2 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, and Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

The isice function returns logical true for all grounded ice and ice shelves according to MEaSURES Antarctic Boundaries for IPY 2007-2009 from Satellite Radar, Version 2. This is the

The measuresann_interp function provides annual surface velocities from Mouginot et al's MEaSUREs dataset.

How to create a bivariate histogram in MATLAB®.

Converts non numeric cells to NaN Expects x to be a row of cells Returns a numeric array

Batch 5

Is only a verification of the function eigenBridge2.m based on the works of [1]. For this reason, I use a slightly different function whose only purpose is to verifiy the numerical

Demonstrates the standard way of treatment of a sequence of PIV images. The result of treatment is saved in a folder after processing each image pair. Before treatment of an image pair, the

Inpsquad is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Mapzoomps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Section 2.3 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

The isiceshelf function returns logical true for all ice shelf locations according to MEaSURES Antarctic Boundaries for IPY 2007-2009 from Satellite Radar, Version 2.

Do leaders have the most children? Let's draw some circles around the leaders.

Provides manipulated variables to control IndPenSim

Maximum biomass growth rate (mu_{X_{max}} ) calculated from the carbon evolution rate (CER) Maximum penicillin growth rate (mu_{P_{max}} ) calculated from first two off line penicillin

The cryosat2_data function returns Helm et al's Antarctic surface elevation DEM and corresponding geographic or polar stereographic cartesian coordinates.

Ammonia, NH3, is burned in air, produces nitrogen and water by the unbalanced reaction

The coord function returns coordinates from mouse clicks. This function was written for the Antarctic Mapping Toolbox.

How to produce an interpolated lighting across the surfaces in MATLAB®. This lighting is good for viewing curved surfaces.

How to create a datetime plot in MATLAB®.

The bamberdem_data function returns Bamber et al. 2009 combined ERS-1 and ICESat Antarctic surface elevations and corresponding geographic or polar stereographic cartesian

Open the folder containing the current file

In this example we will explore some data on exoplanets - planets outside our own solar system. The data used here is a subset of data from the NASA Exoplanet Archive .

The bedmap2_dist calculates distance in kilometers from any location(s) to any Bedmap2 mask type. This function may be useful for finding distance to the nearest grounding line.

This function places degree symbols on tick labels. Labels dynamically update after zooming.

Example 1.10 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

We want to explore the effect of the number of training samples on the sidelobe levels of the SMI adaptive beamformer. To this end, we generate an interference signal at with a power of 70 dB and

This function formats colorbar ticks as dates strings.

The Keysight Infiniium application can load waveform data from a MATLAB® .mat file. The file must contain a set of required information, and be formatted in the right way. Waveform data, for

Section 7.3.1 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

Equivalence of different polysym definitions:

Use the MATLAB® Support Package for Arduino® Hardware to control an Adafruit NeoPixel RGB LED strip.

This function returns indices of values in X and Y that are close to some x,y point. It's similar to find, for nearest neighbors, on a 2D grid.

Below we show how BertiniLab can be used to set up and solve a simple example, the system of equations

Example 9.2 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

This function returns the elements in a 2D matrix bounded by the quandrangle encompassing all real values in the input matrix.

This series of lectures describes the MATLAB® scientific computing environment and how it can be used by physics students.

How to create a datetime plot (bar chart) in MATLAB®.

Section 4.2 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

Copyright (c) 2017, DIBRIS-University of Genoa (www.dibris.unige.it) All rights reserved. Please read the "license.txt" for license terms.

The scatstat2 function returns statistical values of all points within a given radius of each value. This is similar to taking a moving mean, but points do not need to be equally spaced.

Example 9.3 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

The fopmap function creates a map of a flight line from waypoints. Flight lines are placed in context of Bedmap2 gridded data (color), Bedmap2 surface (contours), and MOA2009 grounding

Textps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Section 11.1 from Numerically solving polynomial systems with Bertini, by Daniel J. Bates, Jonathan D. Haunstein, Andrew J. Sommese and Charles W. Wampler (SIAM 2013).

A Mathematical Modeling Example Using a an RC circuit

Spl returns sound pressure level in decibels for an input signal p_Pa in pascals. A reference pressure ref must be declared in units of pascals or specified as 'air' or 'water' to use standard

Open a .mat file saved by the Keysight Infiniium application, and read the header information, without loading all of the data. This function is useful when you just want to examine the

Patchps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Pathdistps is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

Scarloc is part of Antarctic Mapping Tools for Matlab (Greene et al., 2017). Click here for a complete list of functions in AMT.

The Keysight Infiniium application can save waveform data to a MATLAB® .mat file, so that you can work with it directly in MATLAB. One way to read the data is to use the MATLAB load function to

We wish to find the decomposition of the real solutions of the sextic plane curve:

Here we recreate some of the figures from Fretwell et. al's 2013 Cryosphere paper titled "Bedmap2: improved ice bed, surface and thickness datasets for Antarctica."

Use INLINEDEF when you would like to create a function or class definition in a script.

I wanted to look at the underlying space of two factors that went into the overall score for the contest, and see how they related to the length of the entry. The main factors are the result,

We revisit the problem from Example 11.2.2 with a jiammer at except the jammer power is now 70 dB. Clearly, the -50dB tapered beamformer is no longer capable of sufficiently suppressing this

The fopturns function generates a flight path including turns path for given waypoints.

Size d and number of storeys n

In 2013 Rignot et al. published a nice summary of annual mass flux across the grounding lines of major Antarctic glaciers. The paper is tiltled Ice-Shelf Melting Around Antarctica and was

Copyright 2016 The MathWorks, Inc.

The fopprofile function creates a vertical profile of surface elevation, bed elevation, and aircraft elevation along a flight line given waypoints. This function does NOT require

Patchsc plots patch objects with face colors scaled by numeric values.

Implementation of a simple numerical schemes for the wave equation.

The quiverps function plots georeferenced vector fields on a southern-hemisphere polar stereographic map.

The basic procedure of connecting and acquiring data.

CAUTION: The "lde_demo.mlx" link on the File Exchange page may bring up a corrupt version of this file. Download the zip file and extract the uncorrupted lde_demo.mlx from the zip file. Also

The relationship among pressure, volume, and temperature of a gas such as air are frequently modeled using the ideal gas law:

This problem aout the coumpound gear trains inside servomotors. Many devices such as radio controlled toys, remotely operated drones, and industrial automation requires that high

We consider several ways to 'prettify' spy output, all using colored squares to denote elements of S.

PlotColors(colors) will draw patch objects with FaceColor property specified by colors for visual inspection of colors

This function returns accumulation data and corresponding geographic or polar stereographic coordinates.

Accumulation_interp returns accumulation data, interpolated to any lat,lon point, line, or grid. This function is a plugin for the Antarctic Mapping Tools package.

The idea of the CREATIVITY visualization is to find most creative participants of the contests. They are two versions of election of the most creative authors. In the first case the most

Peter Ballo, Martin Foltin, a kol.

Mathematical Modeling of Linkages: Analyze an Engine

A Question on Experiments with Bouncing Balls

A Mathematical modeling example using fluid accumulation in a tank

The forces on an airplane can be evaluated in a wind tunnel or through computational modeling. When this is done, it is common to summarize the results of the data in a simple mathematical

Spatial frequency of the k-th clutter patch.

The grounding line along the Siple Coast was mapped by Horgan and Anandakrishnan (2006) by examining the region of high surface slope which connects relatively flat floating ice shelf to

A Question on Data Analysis for Rock Sawing

This script demonstrates how approximately realistic-looking terrain can be generated with some very simple algorithms. These algorithms are interesting in their simplicity and their

- trafficDetection.m Demo -

Description and guide for the Blast Loads Toolbox for MatLab by Viking and Co. 2017

This is a very simple entry: a plot of the scores of incoming entries versus when they first appeared.

It is well-documented that the Golden Ratio is observed in the angular geometry of seeds in sunflowers, coneflowers and pinecones, as well as other plants and natural phenomena. (

Mimic Figure 1 of Rignot, Mouginot, and Scheuchl's 2011 Science paper titled Ice Flow of the Antarctic Ice Sheet.

Without an input argument, defaultPlotColors() will return the array of 7 default plot colors. Each row respresents one color. Row 1 to row 7 correspond to color 1 to 7, respectively.

James Houghton

How even you can recreate something like Figure 3 of Brunt, Fricker, and Padman's 2011 Journal of Glaciology paper titled, "Analysis of ice plains of the Filchner-Ronne Ice Shelf,

This (publishable) script nndemo.m demonstrates the features of the nearestneighbour function.

Go up one level

Copyright (c) 2016, W J Whiten BSD License

Builtin ribbon() function colors ribbons according to X values

As an inquisitive (and sometimes silly) college student, I would, at times, think of strange problems that have the potential for interesting solutions. On one such occasion, I was in the

How to create a polar scatter plot in MATLAB®.

Describes how to create an image similar to Figure 1 of Stanton et al.'s 2013 Science paper. The paper is titled Channelized Ice Melting in the Ocean Boundary Layer Beneath Pine Island

Generate test cases and add them to a test suite in a loop.

How to create an line plot from a function in MATLAB®.

Tested functions. Abusing globals to keep track of test cases.

Full 'real world' example with passing, skipping & errors.

Materials and sections

Full 'real world' example with only errors.

How to create transparent objects in MATLAB®.

Tested functions to get stack.

Use the MATLAB® Support Package for Arduino® Hardware to implement sequence lighting effects on an Adafruit NeoPixel RGB LED Strip.

Use the MATLAB® Support Package for Arduino® Hardware to control an Adafruit NeoPixel RGB LED Strip to visualize current temperature using TMP36 temperature sensor.

Tic

Use the MATLAB® Support Package for Arduino® Hardware to control two Adafruit NeoPixel LED Strips simultaneously.

Indvec=zeros(1,size(dist_matrix,2)); for i=1:size(dist_matrix,1); indvec(dist_matrix(i,:)

Atom=System;

Add ions randomly wherever there is space (this function is similar to solvate_atom() and insert_atom()

Radius_limit(261,256)=2.3; radius_limit(251,256)=2.3; radius_limit(272,278)=3;

*This function calculates the median position of the atom struct. Should you wrap the atom struct? * Tested 15/04/2017 * Please report bugs to michael.holmboe@umu.se

COLUMNS DATA TYPE FIELD DEFINITION ------------------------------------------------------------------------------------- 1 - 6 Record name "ATOM " 7 - 11 Integer Serial Atom

Molecular simulations need physically sound starting structure/configurations (especially of multi-component systems), as well as a correct molecular and forcefield specific

Import a structure and center it

Here we will show how you could import a molecule and translate it somewhere in the original simulation cell or in a new simulation cell having new dimensions.

Let's import some molecuel and translate it with a 1x3 translation vector.

This is how we import any .gro | .pdb | .xyz file

Put the preem.gro from buildsystem.m and the .itp files from write_atom_itp(), into the same folder as topol.top

First import a molecule...

First let's import and translate some molecule...

Import worksheets in an Excel® file that contains only numeric data (no row or column headers, and no inner cells with text) into a structure array, using the importdata function.

Read numeric data and text headers from all worksheets in an Excel® file into a nested structure array, using the importadata function.

Create two geographic bubble charts with this same map limits.

Reduce the size of the bubbles in a geographic bubble chart using the BubbleWidthRange property. (You can also reduce overlapping by resizing the geographic bubble chart figure.)

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