# Fourier Analysis[![View on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/106725-fourier-analysis) or [![Open in MATLAB Online](https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis&project=fourier-analysis.prj&file=README.mlx)![MATLAB Versions Tested](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FMathWorks-Teaching-Resources%2FFourier-Analysis%2Frelease%2FImages%2FTestedWith.json)**Curriculum Module**_Created with R2021b. Compatible with R2021b and later releases._# InformationThis curriculum module contains interactive [MATLAB® live scripts](https://www.mathworks.com/products/matlab/live-editor.html) and [MATLAB® apps](https://www.mathworks.com/products/matlab/app-designer.html) that teaches fundamental concepts of fourier analysis.## BackgroundThe module is taught from a signal processing perspective at a level suitable for an introductory signals and systems course. In the first lesson, students use apps to visualize Fourier series and build intuition about the frequency domain. In subsequent lessons, students study complex Fourier series, Fourier transforms, and discrete Fourier transforms. As students progress, they transition from utilizing apps to writing their own code to analyze signals. Throughout the module, students apply Fourier techniques to analyze recorded audio signals.The instructions inside the live scripts will guide you through the exercises and activities. Get started with each live script by running it one section at a time. To stop running the script or a section midway (for example, when an animation is in progress), use the Stop button in the **RUN** section of the **Live Editor** tab in the MATLAB Toolstrip.## Contact UsSolutions are available upon instructor request. Contact the [MathWorks teaching resources team](mailto:onlineteaching@mathworks.com) if you would like to request solutions, provide feedback, or if you have a question.## PrerequisitesThis module assumes minimal MATLAB knowledge required for these scripts, but you could use [MATLAB Onramp](https://matlabacademy.mathworks.com/details/matlab-onramp/gettingstarted) as a resource to acquire familiarity with live scripts and MATLAB syntax.## Getting Started### Accessing the Module### **On MATLAB Online:**Use the [](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis&project=fourier-analysis.prj) link to download the module. You will be prompted to log in or create a MathWorks account. The project will be loaded, and you will see an app with several navigation options to get you started.### **On Desktop:**Download or clone this repository. Open MATLAB, navigate to the folder containing these scripts and double\-click on [fourier-analysis.prj](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis&project=fourier-analysis.prj). It will add the appropriate files to your MATLAB path and open an app that asks you where you would like to start. Ensure you have all the required products ([listed below](#H_E850B4FF)) installed. If you need to include a product, add it using the Add\-On Explorer. To install an add\-on, go to the **Home** tab and select **Add-Ons** > **Get Add-Ons**. ## ProductsMATLAB®, Symbolic Math Toolbox™# Scripts *If you are viewing this in a version of MATLAB prior to R2023b, you can view the learning outcomes for each script* [*here*](https://www.mathworks.com/matlabcentral/fileexchange/106725-fourier-analysis)## [**FourierSeries.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis&project=fourier-analysis.prj&file=Scripts/FourierSeries.mlx)| | **In this script, students will...** | **Lab Assignments** || :-- | :-- | :-- || | - Compare signals in the time and frequency domains. - Analyze audio signals in the frequency domain. - Visualize Fourier series modes. - Describe how phase shift is represented in a Fourier series. - Discuss magnitude and phase. | [Lab1\_FourierSeries.mlx](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis&project=fourier-analysis.prj&file=Scripts/Lab1_FourierSeries.mlx) |## [**ComplexFourierSeries.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis&project=fourier-analysis.prj&file=Scripts/ComplexFourierSeries.mlx)| | **In this script, students will...** | **Lab Assignments** || :-- | :-- | :-- || | - Compare signals in the time and frequency domains. - Analyze audio signals in the frequency domain. - Visualize Fourier series modes. - Describe how phase shift is represented in a Fourier series. - Discuss magnitude and phase. | [Lab2\_ComplexFourierSeries.mlx](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis&project=fourier-analysis.prj&file=Scripts/Lab2_ComplexFourierSeries.mlx) |## [**FourierTransform.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis&project=fourier-analysis.prj&file=Scripts/FourierTransform.mlx)| | **In this script, students will...** | **Lab Assignments** || :-- | :-- | :-- || | - Compare signals in the time and frequency domains. - Analyze audio signals in the frequency domain. - Visualize Fourier series modes. - Describe how phase shift is represented in a Fourier series. - Discuss magnitude and phase. | [Lab3\_FourierTransform.mlx](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis&project=fourier-analysis.prj&file=Scripts/Lab3_FourierTransform.mlx) |## [**DiscreteFourierTransform.mlx**](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis&project=fourier-analysis.prj&file=Scripts/DiscreteFourierTransform.mlx)| | **In this script, students will...** | **Lab Assignments** || :-- | :-- | :-- || | - Compare signals in the time and frequency domains. - Analyze audio signals in the frequency domain. - Visualize Fourier series modes. - Describe how phase shift is represented in a Fourier series. - Discuss magnitude and phase. | [Lab4\_DFT.mlx](https://matlab.mathworks.com/open/github/v1?repo=MathWorks-Teaching-Resources/Fourier-Analysis&project=fourier-analysis.prj&file=Scripts/Lab4_DFT.mlx) |# Apps| Sine and Cosine Series app | Fourier Series app | Magnitude and Phase app | Complex Fourier Series app || :-- | :-- | :-- | :-- || | | | |# Educator Resources- [Educator Page](https://www.mathworks.com/academia/educators.html) Copyright 2023 The MathWorks™, Inc

Those wishing to model a surface from data in the form of z(x,y) from scattered or semi-scattered data have had few options in matlab - mainlygriddata.Griddata is a valuable tool for interpolation of scattered data. However it fails when there are replicates or when the data has many collinear points. Griddata is also unable to extrapolate beyond the convex hull of the data unless the 'v4' option is used, which is slow.Gridfit solves all of these problems, although itis not an interpolant. It builds a surface over a complete lattice, extrapolating smoothly into the corners. You have control of the amount of smoothing done, as well as interpolation methods, which solver to use, etc.This release allows the user to solve much larger problems using a new tiling option. There is essentially no limit on the size of the suface one builds now, as long as you have dense enough data and enough memory to store the final gridded surface.Example uses are found in the file gridfit_demo.m,as well as comparisons to griddata on the same surfaces.

* * * The functions on this page are no longer being updated. They should still work as shown in the examples here, but I am only actively maintaining the versions of these functions which are in the Climate Data Toolbox for MATLAB, which can be found here https://www.mathworks.com/matlabcentral/fileexchange/70338. * * *This submission contains functions to plot the outlines and names of National borders and US states. Matlab's Mapping Toolbox is NOT required. There are two functions for plotting: borders and bordersm, and they both work the same way, except that bordersm is for use with maps created using Matlab's Mapping Toolbox. Similarly, labelborders and labelbordersm place text labels within the boundaries of countries or states.

Polarplot3d produces surface, mesh, wireframe and contour plots for three dimensional polar data. A labeled polar axis is drawn at a fixed height or it can follow the surface contour at maximum radius. A polar grid can also be drawn on top of the surface.This function is based on polar3d by J De Freitas, file exchange ID 7656. The input parameters are a matrix of magnitudes, Zp, and a list of property,value pairs that modify the default plot behavior. Each column of Zp contains information along a single half-meridian and each row gives height values along a circular arc. By default Zp is assumed to be increasing in radius down each column and increasing in angle (counter-clockwise) along each row. The default plot is drawn over a full circle of unit radius.'RadialRange' and 'AngularRange' properties can be used to specify the upper and lower angular and radial values over which the data is plotted. The relative ordering of the angular and radial range vectors is used to determine the angular and radial direction sense of the rows and columns of Zp. Alternatively a vector can be specified giving the locations of each row or column.The polar axis can be placed at the minimum, maximum or mean value of Zp at the largest radius, at the top or bottom of the plot box, at a user specified location, or it can follow the surface at the perimeter of the data. The polar axis tick mark spacing can be adjusted with the 'TickSpacing' property.The default polar axis orientation is that zero degrees is along the +X axis and increasing angles are counter-clockwise. The 'PolarDirection' property can be used to change this to a compass style plot with zero degrees along the +Y axis and increasing angles going clockwise around the pole.Default surface coloring is according to the values in Zp. This can be changed by supplying a matrix the same size as Zp as the value of the 'ColorData' property.A scaling parameter can be specified to interpolate the data onto a finer or coarser mesh. The output Cartesian data is returned in three matrices.The example plot in the screenshot was produced with the following commands. [t,r] = meshgrid(linspace(0,2*pi,361),linspace(-4,4,101)); [x,y] = pol2cart(t,r); P = peaks(x,y); % peaks function on a polar grid % draw 3d polar plot figure('Color','white','NumberTitle','off','Name','PolarPlot3d v4.3'); polarplot3d(P,'PlotType','surfn','PolarGrid',{4 24},'TickSpacing',8,... 'AngularRange',[30 270]*pi/180,'RadialRange',[.8 4],... 'RadLabels',3,'RadLabelLocation',{180 'max'},'RadLabelColor','red'); % set plot attributes set(gca,'DataAspectRatio',[1 1 10],'View',[-12,38],... 'Xlim',[-4.5 4.5],'Xtick',[-4 -2 0 2 4],... 'Ylim',[-4.5 4.5],'Ytick',[-4 -2 0 2 4]); title('polarplot3d example');The zip file contains the polarplot3d function and an m-file with example plots.

pcolor in polar coordinatespolarPcolor draws a pseudocolor plot in polar coordinates with a polar grid.SummarypolarPcolor aims to represent a pseudocolour plot in polar coordinates, with a radial grid to allow clear visualization of the data. It is well suited for Plan Position Indicator (PPI) scan for radar or lidar for example [1]. A similar function is available in ref. [2], which propose a visualization in 3D.References[1] Cheynet, E., Jakobsen, J. B., Snæbjörnsson, J., Reuder, J., Kumer, V., & Svardal, B. (2017). Assessing the potential of a commercial pulsed lidar for wind characterisation at a bridge site. Journal of Wind Engineering and Industrial Aerodynamics, 161, 17-26. http://dx.doi.org/10.1016/j.jweia.2016.12.002[2] http://www.mathworks.com/matlabcentral/fileexchange/13200-3d-polar-plot

The function defines a customized colobar given the positions and the colors that are going to generate the gradients. A Live Script example is also provided to understand the following parameters:- positions: Vector of positions, from 0 to 1. Note that the first position must be 0, and the last one must be 1.- colors: Colors to place in each position. This parameter can be specified as a RGB matrix (n_colors x 3), or as a cell vector, containing HTML values. For instance: {'#ffffff','#ff0000','#000000'} is equivalent to [1 1 1; 1 0 0; 0 0 0].*Update*: The function customcolormap_preset provides 8 new cool presets in order to save time configuring your own!. The presets are 'pasteljet', 'red-yellow-blue', 'red-yellow-green', 'red-white-blue', 'orange-white-purple', 'purple-white-green', 'pink-white-green', 'brown-white-pool'.Example of use:J = customcolormap([0 0.5 1], {'#ffffff','#ff0000','#000000'});colorbar; colormap(J); axis off;

Library of virtual envrionments designed to aid in the teaching of basic concepts in robotics along with re-usable lessons and other robotics demos. MATLAB APP available through the app menu after install to help get started.Lessons for:- Intro to MATLAB- Basic robot movements- Intro to Simulink- Teleoperation robot controls- Programming distance sensors- Programming custom behavior- Intro to Stateflow (Flow Diagrams)- Maze solving robotsVEX Clawbot simulation demos for:- Teleoperation and Control- Simulation of Autonomous Algorithms- Autonomous Behavior with Active PerceptionBEST Robotics Online Game 2020 - Outbreak- Game Template for Keyboard Control- Game Template for Gamepad Control- Game Template for Autonomous ControlIf you have any questions feel free to contact us at roboticsarena@mathworks.com

These functions simply reshape the contour matrix C into something a little more user friendly. [x,y,z] = C2xyz(C) 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.

Adding to the mix of circle plotters on the File Exchange site, this function plots any number of circles of any size and x,y location. Inputs can be any logical mix of scalars, vectors, or N-D arrays. Circles can be easily formatted using LineSpec and ColorSpec name-value pairs. Syntaxcircles(x,y,r)circles(...,'vertices',numberOfPoints)circles(...,'rotation',degreesRotation)circles(...,'ColorProperty',ColorValue)circles(...,'LineProperty',LineValue)h = circles(...)Descriptioncircles(x,y,r) plots circle(s) of radius or radii r centered at points given by x and y. Inputs x, y, and r may be any combination of scalar, vector, or 2D matrix, but dimensions of all nonscalar inputs must agree.circles(...,'vertices',numberOfPoints) allows specification of how many points to use for the outline of each circle. Default value is 1000, but this may be increased to increase plotting resolution. Or you may specify a small number (e.g. 4 to plot a square, 5 to plot a pentagon, etc.).circles(...,'rotation',degreesRotation) rotates the shape by a given degreesRotation, which can be a scalar or a matrix. This is useless for circles, but may be desired for polygons with a discernible number of corner points.circles(...,'ColorProperty',ColorValue) allows declaration of 'facecolor' or 'facealpha' as name-value pairs. Try declaring any fill property as name-value pairs.circles(...,'LineProperty',LineValue) allows declaration of 'edgecolor', 'linewidth', etc.h = circles(...) returns the handle(s) h of the plotted object(s).TIPS: 1. Include the name-value pair 'facecolor','none' to draw outlines (non-filled) circles. 2. Follow the circles command with axis equal to fix distorted circles.

This tutorial will guide you through the steps necessary to implement a MATLAB algorithm in FPGA hardware, including: * Create a streaming version of the algorithm using Simulink * Implement the hardware architecture * Convert the design to fixed-point * Generate and synthesize the HDL code

Generate JavaScript using MATLAB Coder Add-On in combination with the Emscripten compiler converts your MATLAB functions into high-performance, client-side JavaScript/WebAssembly apps and libraries. Generated code can be compiled, embedded, and run in any modern browser; including, Google Chrome, Mozilla FireFox, Microsoft Edge, and Apple Safari. The generated code can also be run in standalone JavaScript engines, such as NodeJS.Sample projects can be seen at these links:https://github.com/minoue-xx/Sudoku-Solver-via-Wasm with live demo here https://minoue-xx.github.io/Sudoku-Solver-via-Wasm/https://github.com/ppeeling/handwritten-digit-prediction-on-browser with live demo here https://ppeeling.github.io/handwritten-digit-prediction-on-browser/If you would like your project showcased here, please reach out to me. Thank you.

Example files for the MATLAB and Simulink Robotics Arena videos and blog posts on walking robots.Refer to the GitHub page for more information and links, as well as to download older releases of this submission: https://github.com/mathworks-robotics/msra-walking-robotFor any questions, email us at roboticsarena@mathworks.com.

The goal of this case study is to explore storm events in various locations in the United States and analyze the frequency and damage costs associated with different types of events. A machine learning model is used to predict the damage costs, based on historical data from 1980 - 2020. The calculations are then performed in an app, which can be shared as a web application.This example also highlights techniques for cleaning data in various forms (numeric, text, categorical, dates and times) and working with large data sets which do not fit into memory.The example is used in the "Data Science with MATLAB" webinar series.

This toolbox provides utilities for robot simulation and algorithm development. This includes:- 2D kinematic models for robot geometries such as differential drive, three, and four-wheeled vehicles, including forward and inverse kinematics- Configurable lidar, object, and robot detector simulators - Visualization of robotic vehicles and sensors in occupancy maps- MATLAB and Simulink examples and documentation

Click on the Examples Tab ^^^ for detailed descriptions of AMT functions. This toolbox is for importing, analyzing, and displaying Antarctica-related data. AMT is designed to provide a standard framework to allow easy pairing of multiple different types of data sets (surface elevation, ice velocity, grounding line, etc). For a quick overview, check the Examples tab on this page and click "AMT Getting Started". To find data-specific plugins for this toolbox, search the File Exchange site for "AMT".Note to users: AMT was originally written to be used with Matlab's Mapping Toolbox. However, Matlab's Mapping Toolbox is sometimes inefficient and difficult to work with. And depending on Matlab's Mapping Toolbox makes it harder to share codes. So I've been moving more toward plotting mostly in polar stereographic meters. There is a suite of functions ending in "ps" that make this easy. If AMT is useful for you, please cite our paper!

Finite differences for the 2D heat equationImplementation of a simple numerical schemes for the heat equation.Applying the second-order centered differences to approximate the spatial derivatives,Neumann boundary condition is employed for no-heat flux, thus please note that the grid location is staggered. Once the right hand side is obtained, the equation can be solved by the ODE suite. Here we use ode15s. Copyright 2015-2016 The MathWorks, Inc.Problem SetupN = 50; % Number of grid in x,y-directionL = 4*pi; % Domain size% Grid pointx = linspace(0,L,N);y = linspace(0,L,N);% Make it staggered.x = (x(1:end-1)+x(2:end))/2;y = (y(1:end-1)+y(2:end))/2;[X,Y] = meshgrid(x,y);Initial Condition% Let's use MATLAB logo.% A variable u0 is defined at the center of each grid cell% thus the number of grid point is N-1.u0(:,:) = peaks(N-1);% Plot ithandle_surf = surf(X,Y,u0);handle_axes = gca;handle_axes.ZLim = [-10,10];handle_axes.CLim = [-10,10];title('Evolution of MATLAB Logo by Heat equation');Simulationdx = x(2)-x(1); % spatial grid sizealpha = 2; % coefficienttspan = linspace(0,1,40);[t,u] = ode15s(@(t,x)getRHS(x,alpha,dx,N),tspan,u0(:));VisualizeTn = length(t);u = reshape(u,Tn,N-1,N-1);filename = 'heat.gif';for ii=1:Tn Z = u(ii,:,:); Z = squeeze(Z); handle_surf.ZData = Z; drawnow; frame = getframe(gcf); im = frame2im(frame); [A,map] = rgb2ind(im,256); if ii==1 imwrite(A,map,filename,'gif','LoopCount',Inf,'DelayTime',0.05); else imwrite(A,map,filename,'gif','WriteMode','append','DelayTime',0.05); endendCopyright 2015-2016 The MathWorks, Inc.

WARNING - This version of Widgets Toolbox is intended to support forward compatibility of *existing* apps only. If you are building new apps in MATLAB R2020b or later, please instead use the new "Widgets Toolbox - MATLAB App Building Components":https://www.mathworks.com/matlabcentral/fileexchange/83328-widgets-toolbox-matlab-app-building-componentshttps://github.com/mathworks/widgets-toolboxStarting in MATLAB R2020b, most existing apps that depend on Widgets Toolbox (uiw.* package) can be migrated from traditional figure windows (Java-based) into modern UI Figures (uifigure). There are known limitations and incompatibilities associated with migrating existing Widgets Toolbox content into uifigure. For this, please see the release notes at the end of the Getting Started Guide and begin testing migration of your apps into uifigure. It is recommended you install this as a toolbox to automatically set up the proper MATLAB and Java paths. If you install this manually, please review the installation directions in the Getting Started guide.Need help upgrading a business-critical app? MathWorks Consulting can help: https://www.mathworks.com/services/consulting/proven-solutions/software-upgrade-service.html

On shipping inspection for chemical materials, clothing, and food materials, etc, it is necessary to detect defects and impurities in normal products. However, it is difficult to collect enough abormal images to use for deep learning.This demo shows how to detect and localize anomalies using CAE.This method using only normal images for training may allow you to detect abnormalities that have never been seen before. By customizing SegNet model, you can easily get the network structure for this task.[Japanese]このデモでは正常な画像に紛れる異常をディープラーニングを用いて検出ならびに位置の特定を行えます。正常な画像のみ使ってモデルを学習させるこの方法では,これまで見たことがない異常に対しても検出できる可能性があります。簡単にモデル構造を得るためにSegNetモデルをカスタムして利用しています。[Keyward] 画像処理・画像分類・ディープラーニング・DeepLearning・IPCVデモ ・SegNet ・異常検出・外観検査・セマンティックセグメンテーション・オートエンコーダー・畳み込み

Sometimes your 1D data has gaps. This may be due to a faulty sensor or irregular sampling intervals. When this is the case, you may want to interpolate over short gaps in your data, but where no data exist for long periods of time, it's inappropriate to interpolate. This function performs interpolation over small gaps in 1D data.Syntaxvq = interp1gap(v)vq = interp1gap(x,v,xq)vq = interp1gap(...,maxgapval)vq = interp1gap(...,'method')vq = interp1gap(...,'interpval',vval)vq = interp1gap(...,'extrap',extrapval)Descriptionvq = interp1gap(v) linearly interpolates to give undefined (NaN) values of v.vq = interp1gap(x,v,xq) interpolates to find vq, the values of the underlying function v at the points in the vector or array xq.vq = interp1gap(...,maxgapval) specifies a maximum gap in the independent variable over which to interpolate. If x and xq are given, units of maxgapval match the units of x. If x and xq are not provided, units of maxgapval are indices of v, assuming any gaps in v are represented by NaN. If maxgapval is not declared, interp1gap will interpolate over infitely-large gaps.vq = interp1gap(...,'method') specifies a method of interpolation. Default method is 'linear', but can be any of the following: 'nearest' nearest neighbor interpolation 'linear' linear interpolation (default) 'spline' cubic spline interpolation 'pchip' piecewise cubic Hermite interpolation 'cubic' (same as 'pchip') 'v5cubic' Cubic interpolation used in MATLAB 5. 'next' next neighbor interpolation (Matlab R2014b or later) 'previous' previous neighbor interpolation (Matlab R2014b or later)vq = interp1gap(...,'interpval',vval) specifies a value with which to replace vq elements corresponding to large gaps. Default is NaN.vq = interp1gap(...,'extrap',extrapval) returns the scalar extrapval for out-of-range values. NaN and 0 are often used for extrapval.

This toolbox provides tools to create a sandbox for developing custom MATLAB toolbox. It uses a convention enforcing best practices in order to help streamline and standardise your toolbox development and packaging process.http://blogs.mathworks.com/developer/2017/01/13/matlab-toolbox-best-practices/This version is for MATLAB release R2019a onwards.

regularizeNd creates a gridded lookup table from scattered data in n dimensions.regularizeNd is function written in MATLAB that extends functionality of RegularizeData3d from 2-D input to n-D input. More background can be found here and here.The basic idea is that a lookup table is fitted to the scattered data with a required level of smoothness. The smoothness parameter trades between goodness of fit and smoothness of the curve (1-D), surface (2-D), or hypersurface (n-D).Browse the Mathworks File Exchange examples: https://www.mathworks.com/matlabcentral/fileexchange/61436-regularizend#examples_tabDemo

figtitle creates a title centered at the top of a figure. This may be used to add a title to a figure with several subplots.Syntax:figtitle('TitleString')figtitle('TitleString','TextProperty','TextValue')h = figtitle(...)Description:figtitle('TitleString') centers a title at the top of a figure and sets the figure name to 'TitleString'.figtitle('TitleString','TextProperty',TextValue) formats the title with property name value pairs (e.g., 'FontSize',20)h = figtitle(...) returns a handle h of the newly-created title.Examples: figtitle('My Title')figtitle('My Title','fontweight','bold')figtitle('My Title,'fontsize',18,'fontangle','oblique')h = figtitle('My Title');set(h,'edgecolor','magenta'); In many cases a figure title may overlap a subplot title. To reduce ambiguity, try pairing this function with the ntitle function, which is available on the Mathworks File Exchange here: http://www.mathworks.com/matlabcentral/fileexchange/42114-ntitle. The image for this FEX upload was created using the figtitle and ntitle example given in figtitle.m.

An affine (or first-order) optic flow model has 6 parameters, describing image translation, dilation, rotation and shear. The class affine_flow provides methods to estimates these parameters for two frames of an image sequence.The class implements a least-squares fit of the parameters to estimates of the spatial and temporal grey-level gradients. This is an extension of the well-known Lucas-Kanade method. The images are either sampled conventionally, on a rectilinear grid, or on a log-polar grid. In the latter case, the class may iteratively refine its estimates by moving the sampling grid to track the motion. Options to specify a region of interest and smoothing and sampling parameters are provided.The file includes a demonstration of the class, and test images for this. The functions for smoothing images and estimating gradients may be useful independently, and log-polar sampling functions are included (and are available separately in submission 27023).

windSimFastA three-variate turbulent wind field (u,v and w components) is simulated in three-dimensions.SummaryA turbulent wind field (u,v,w, components) in 3-D (two dimensions for space and one for the time) is simulated using random processes. The computational efficiency of the simulation relies on Ref. [1], which leads to a significantly shorter simulation time than the function windSim, also available on fileExchange. However, only the case of a regular 2D vertical grid normal to the flow is here considered.ContentThe submission contains:An example file Example1 that illustrates simply how the output variables look like.An example file Example2, which is more complete, and which simulates a 3-D turbulent wind field on a 7x7 grid.A data file exampleData.mat used in Example1.The function windSimFast.m, which is used to generate the turbulent wind field. A similar implementation of windSimFast.m was used in ref. [2].The function getSamplingpara.m, which computes the time and frequency vectors.The function KaimalModel.m, which generates the one-point auto and cross-spectral densities of the velocity fluctuations, following the Kaimal model [3]. I have corrected the cross-spectrum density formula used by Kaimal et al. so that the simulated friction velocity is equal to the target one.The function coherence used to estimate the root-mean-square coherence, the co-coherence and the quad-coherence.The function write2bts to convert the data into a .bts file (binary data). This function is still under testing and I ignore if it performs well.Any comment, suggestion or question is welcomed.References[1] Shinozuka, M., & Deodatis, G. (1991). Simulation of stochastic processes by spectral representation. Applied Mechanics Reviews, 44(4), 191-204.[2] Wang, J., Cheynet, E., Snæbjörnsson, J. Þ., & Jakobsen, J. B. (2018). Coupled aerodynamic and hydrodynamic response of a long span bridge suspended from floating towers. Journal of Wind Engineering and Industrial Aerodynamics, 177, 19-31.[3] Davenport, A. G. (1961). The spectrum of horizontal gustiness near the ground in high winds. Quarterly Journal of the Royal Meteorological Society, 87(372), 194-211.

This package includes MATLAB and Simulink files that allow users to communicate with and control the sensors and actuators used in the Arduino Engineering Kit, most of which are connected through the MKR Motor Carrier. This includes: • DC motor – control up to 4 DC motors simultaneously • Servo motor – control up to 8 servo motors simultaneously • Encoder – read up to 2 encoders simultaneously• Tachometer – read rotational speed from the hall sensor on the motorcycle’s inertia wheel• BNO055 IMU sensor – read from the accelerometer, magnetometer, and gyroscope• Ultrasonic sensor – measure the distance to an object• LiPo Battery – read the battery voltage Examples are included to demonstrate how to use the MATLAB functions and Simulink blocks included in this package. Learn more about the Arduino Engineering Kit at www.mathworks.com/arduino-kit Important notes: 1) After installing this toolbox, type the following command in MATLAB to open the ReadMe>> edit ArduinoKitHardwareSupportReadMe.txt2) Be sure to follow the steps in this file, as it provides instructions on downloading the Arduino library for the MKR Motor Carrier. This library is required for some of the functionality to work.

The c130 function draws a simple 3D airplane modelled after the Lockheed C-130. The xyz2rpy function estimates roll, pitch, and yaw from given x,y,z coordinates. No special toolboxes required. Syntax:c130c130(x,y,z)c130(...,'roll',RollDegrees)c130(...,'pitch',PitchDegrees)c130(...,'yaw',YawDegrees)c130(...,'color',AirplaneColor)c130(...,'fuselage',FuseLageColor)c130(...,'wing',WingColor)c130(...,'tailwing',TailwingColor)c130(...,'fin',FinColor)c130(...,'prop',PropellerColor)c130(...,'scale',SizeScaleFactor)c130(...,'z',ZScaleFactor)c130(...,'linestyle','LineStyle')c130(...,'linecolor',LineColor)h = c130(...)Description:c130 draws a 3D airplane.c130(x,y,z) draws an airplane centered approximately at the location given by x,y,z, where x, y, and z must be scalar values.c130(...,'roll',RollDegrees) specifies roll of the aircraft in degrees relative to the approximate center of gravity of the aircraft.c130(...,'pitch',PitchDegrees) specifies pitch of the aircraft in degrees.c130(...,'yaw',YawDegrees) specifies yaw of the aircraft in degrees in the global coordinate system. The xyz2rpy function may help with determining appropriate yaw values.c130(...,'color',AirplaneColor) specifies a color of all surfaces of the plane. Color may be given by Matlab color name (e.g., 'red'), Matlab color abbreviation (e.g., 'r'), or RGB value (e.g., [1 0 0]). The 'color' option may be paired with options for specifying colors of specific parts of the plane. For example, c130('color','b','wing',y) creates a blue airplane with yellow wings. Default color is gray.c130(...,'fuselage',FuselageColor) specifies fuselage color.c130(...,'wing',WingColor) specifies wing color.c130(...,'tailwing',TailwingColor) specifies color of horizontal stabilizer wings at the tail of the plane.c130(...,'fin',FinColor) specifies color of the vertical stabilizer fin at the tail of the plane.c130(...,'prop',PropellerColor) specifies propeller color.c130(...,'scale',SizeScaleFactor) scales dimensions of the plane by some scalar factor. By default, c130 draws an airplane with dimensions which approximately match the dimensions C-130 airplane in meters. If you'd like to draw a C-130 in dimensions of feet, try c130('scale',3.281).c130(...,'z',ZScaleFactor) scales only vertical dimensions by some scalar value. This may be useful if you're animating an airplane in a coordinate system where the vertical dimension is stretched to show relief. If your axes are not equal, consider a ZScaleFactor given by the ratio of (xlim(2)-xlim(1))/(zlim(2)-zlim(1)).c130(...,'linestyle','LineStyle') specifies style of the lines connecting surface vertices. Default is '-', but can be set to any valid linestyle, including 'none' to show a smooth surface.c130(...,'linecolor',LineColor) specifies edge color of lines connecting surface verticies. Default line color is black.h = c130(...) returns handles of the 13 surface objects created by c130.

This package includes examples that shows you how to generate Android applications using Simulink® Support Package for Android Devices and integrate the generated application with rosjava library to support ROS communication on Android.Set Position of a Bebop Drone on a Gazebo Simulator from an Android Device Using ROS example shows how to generate an Android™ application to set the position of the bebop drone on the Gazebo® simulator using Simulink® Support Package for Android Devices.Visualize Sensor Data from an Android Device in RViz, example shows how to generate an Android™ application to visualize live sensor data from an Android device on the ROS visualization (RViz) tool using Simulink® Support Package for Android Devices. In this example, sensor data such as orientation, angular velocity, and acceleration of the device are visualized.

This contribution provides functionality to create filled area 2D linear plots, with full control over where and how areas are drawn.The function 'shade' inherits its calling syntax from MATLAB's built-in 'plot' function, which hopefully should make its use intuitive. Some additional parameters, in the form of name-value pairs, allow controlling the filling behaviour. A live script is provided with multiple examples of usage.Please do report any problems or suggestions and I will do my best to help.

Mode shapes extraction by time domain decomposition (TDD)SummaryThe Time domain decomposition (TDD) [1] is an output-only method to extract mode shapes of a structure. Here, the modal damping ratios and modal displacements are in addition extracted using the functions presented in [6]. The TDD is similar to a more popular technique called Frequency-domain method (FDD) that was introduced by [2,3]. A good example of the FDD already exists on the Matlab File Exchange [4]. In a previous version, the present submission contained a function for the FDD. This function has been modified and moved to a new submission [5].ContentThe submission contains:The function TDD.m: function to apply the TDD method.An example file Example1.mAcceleration data beamData.m (4 Mb)References[1] Byeong Hwa Kim, Norris Stubbs, Taehyo Park, A new method to extract modal parameters using output-only responses, Journal of Sound and Vibration, Volume 282, Issues 1–2, 6 April 2005, Pages 215-230, ISSN 0022-460X, http://dx.doi.org/10.1016/j.jsv.2004.02.026.[2] Brincker, R.; Zhang, L.; Andersen, P. (2001). "Modal identification of output-only systems using frequency domain decomposition". Smart Materials and Structures 10 (3): 441. doi:10.1088/0964-1726/10/3/303.[3] BRINCKER, Rune, ZHANG, Lingmi, et ANDERSEN, P. Modal identification from ambient responses using frequency domain decomposition. In: Proc. of the 18*‘International Modal Analysis Conference (IMAC), San Antonio, Texas. 2000[4] http://www.mathworks.com/matlabcentral/fileexchange/50988-frequency-domain-decomposition--fdd-[5] https://se.mathworks.com/matlabcentral/fileexchange/57153-automated-frequency-domain-decomposition--afdd-[6] https://se.mathworks.com/matlabcentral/fileexchange/55557-modal-parameters-identification-from-ambient-vibrations--sdof

Useful when you want automate the process of pulling numbers off of a web page.

Overview : This example is explaining how to convert various native .NET data types to types compatible with MATLAB in Visual Studio. Basically, there are two main sections here which are 1) how to import correct data type to MATLAB function in Visual Studio.2) how to read the data type exported from MATLAB function in Visual Studio. For this example, it expects you know how to compile your MATLAB function to .net assembly, and know how to set up the configuration of Visual Studio to call MATLAB function. You may learn those through the link below:https://www.mathworks.com/help/compiler_sdk/gs/create-a-dotnet-application-with-matlab-code.html Highlights : Understand the the conversion of data type between .net and MATLAB in Visual StudioProduct Focus :MATLABMATLAB Compiler SDKThird-party Software required :Visual Studio (This example uses Visual Studio 2017)Written at 19 November 2018

The Hough transform may be used to detect circular shapes in images, after binarisation, for example by an edge detector. Often, functions to do this operation require the radius of the circle to be specified.The function circle_hough allows a range of radii to be specified, so that the radius does not need to be known exactly in advance. It is likely to be faster than calling a standard function repeatedly for different radii.Multiple circles may be detected by finding peaks in the 3D accumulator array. A function, circle_houghpeaks, is provided for this. A demonstration of the two functions is included as a script, circle_houghdemo.The zip file includes an efficient and accurate implementation of circle approximation, without gaps, on an integer grid.

Requires MATLAB 2016b or later.Use this code to provide a framework for your own big data analysis.Contains all MATLAB files needed to replicate the demos featured in the fast-paced "Using Tall Arrays with Big Data" video [ http://www.mathworks.com/videos/matlab-tall-arrays-in-action-122883.html ], which is highly recommended for you to watch and obtain context:1. Pickups demo [.mlx - MATLAB live script] - requires Mapping Toolbox and Distributed Computing Toolbox2. Averages demo [.mlx - MATLAB live script] - requires Statistics Toolbox and Distributed Computing Toolbox3. wms.mat [needed for Pickups demo]4. load_settings.m [needed for Pickups demo]This zip file does NOT contain datasets. Datasets can be downloaded at http://www.nyc.gov/html/tlc/html/about/trip_record_data.shtml. Only one dataset is needed to run the scripts.This zip file DOES contain the following additional files, which are generated from running the Pickups demo on ALL 2015 Yellow cab datasets:5. .gif of all 2015 pickups by hour ("raw" version)6. .gif of all 2015 pickups by hour ("cleaned" version)7. .fig of all 2015 pickups summarized in a 2D histogram. This can be opened (and manipulated) in MATLAB.

TopoToolbox provides a set of Matlab functions that support the analysis of relief and flow pathways in digital elevation models. The major aim of TopoToolbox is to offer helpful analytical GIS utilities in a non-GIS environment in order to support the simultaneous application of GIS-specific and other quantitative methods.TopoToolbox enables calculation of standard terrain attributes such as- slope- curvature- aspect- local topography- ...flow related terrain attributes such as- drainage basin delineation- flow accumulation- flow distance- ...stream network analysis such as- stream order- slope-area plots- chiplotsMoreover, TopoToolbox contains several tools to modify stream networks in an automated way and derive swath profiles, among other tools. The algorithms are fast and can thus be used in spatially distributed, dynamic modelling approaches in hydrology, glaciology and geomorphology. See http://topotoolbox.wordpress.com for examples and instructions.

This submission provides the code explained by the (upcoming) eBook on the complete machine learning workflow. Based on the heart sound recordings of the PhysioNet 2016 challenge, a model is developed that classifies heart sounds into normal vs abnormal, and deployed in a prototype (heart) screening application. The workflow demonstrates:1) using datastore for efficiently reading large number of data files from several folders 2) using tools from signal processing, wavelets and statistics for feature extraction 3) using ClassificationLearner app to interactively train, compare and optimize classifiers without writing any code4) programmatically training an ensemble classifier with misclassification costs 5) applying an automated feature selection to select a smaller subset of relevant features 6) performing C code generation for deployment to an embedded system7) applying Wavelet scattering to automatically extract features that outperform manually engineered ones

Midpoint Displacement Method (original algorithm for 3D and 2D)Fractal Zooming of images Infinite Fractal Zooming of Fractal SurfacesSpectral Synthesis of 1D, 2D, and 3D fractalsMeasure Fractal Dimension with Power Spectral DensityMeasure Fractal Dimension with 2nd Order Spatial StatisticsBoth Global and Local (Neighborhood) Fractal DimensionFractalness - degree to which a texture is a fractal is determined

Simply convert between hex color values and rgb color values. These two functions can handle arrays as inputs. Default rgb values are scaled from 0 to 1 to match Matlab's syntax. However, if you'd like to use RGB values scaled from 0 to 255, that'll work too. SYNTAX:rgb = hex2rgb(hex) returns rgb color values in an n x 3 array. Values are scaled from 0 to 1 by default. rgb = hex2rgb(hex,255) returns RGB values scaled from 0 to 255. * * * * * * * * * * * * * * * * * * * * EXAMPLES: myrgbvalue = hex2rgb('#334D66') = 0.2000 0.3020 0.4000myrgbvalue = hex2rgb('334D66') % <-the # sign is optional = 0.2000 0.3020 0.4000myRGBvalue = hex2rgb('#334D66',255) = 51 77 102myhexvalues = ['#334D66';'#8099B3';'#CC9933';'#3333E6'];myrgbvalues = hex2rgb(myhexvalues) = 0.2000 0.3020 0.4000 0.5020 0.6000 0.7020 0.8000 0.6000 0.2000 0.2000 0.2000 0.9020myhexvalues = ['#334D66';'#8099B3';'#CC9933';'#3333E6'];myRGBvalues = hex2rgb(myhexvalues,255) = 51 77 102 128 153 179 204 153 51 51 51 230********************************************************THE OTHER FUNCTION********************************************************SYNTAX:hex = rgb2hex(rgb) returns the hexadecimal color value of the n x 3 rgb values. rgb can be an array. This function assumes rgb values are in [r g b] format on the 0 to 1 scale. If, however, any value r, g, or b exceed 1, the function assumes [r g b] are scaled between 0 and 255. * * * * * * * * * * * * * * * * * * * * EXAMPLES: myhexvalue = rgb2hex([0 1 0]) = #00FF00myhexvalue = rgb2hex([0 255 0]) = #00FF00myrgbvalues = [.2 .3 .4; .5 .6 .7; .8 .6 .2; .2 .2 .9];myhexvalues = rgb2hex(myrgbvalues) = #334D66 #8099B3 #CC9933 #3333E6

Refer: An Introduction to Support Vector Machines and Other Kernel-based Learning Methods by Nello Cristianini and John Shawe-Taylor] The training algorithm only depend on the data through dot products in H, i.e. on functions of the form Φ(x_i)·Φ(x_j). Now if there were a “kernel function” K such that K(x_i,x_j) = Φ(x_i)·Φ(x_j), we would only need to use K in the training algorithm, and would never need to explicitly even know what Φ is. One example is radial basis functions (RBF) or gaussian kernels where, H is inﬁnite dimensional, so it would not be very easy to work with Φ explicitly. Training the model requires the choice of: • the kernel function, that determines the shape of the decision surface • parameters in the kernel function (eg: for gaussian kernel:variance of the Gaussian, for polynomial kernel: degree of the polynomial) • the regularization parameter λ.

On-line regression On-line learning algorithms are not restricted to classiﬁcation problems. The update rule for the kernel adatron algorithm also suggests a general methodology for creating on-line versions of the optimisations.making the ﬁrst update of the kernel adatron algorithm equivalent to αi ← αi + ∂W(α) ∂αi making it a simple gradient ascent algorithm augmented with corrections to ensure that the additional constraints are satisﬁed. If, for example, we apply this same approach to the linear ε-insensitive loss version of the support vector regression algorithm. One of the advantages of Support Vector Machine, and Support Vector Regression as the part of it, is that it can be used to avoid difficulties of using linear functions in the high dimensional feature space and optimization problem is transformed into dual convex quadratic programmes. In regression case the loss function is used to penalize errors that are grater than threshold - . Such loss functions usually lead to the sparse representation of the decision rule, giving significant algorithmic and representational advantages. Reference:Kernel Methods for Pattern Analysis byJohn Shawe-Taylor & Nello Cristianinihttp://kernelsvm.tripod.com/

Deep Learning is powerful approach to segment complex medical image. This example shows how to create, train and evaluate a V-Net network to perform 3-D lung tumor segmentation from 3-D medical images. The steps to train the network include:・Download and preprocess the training data.・Create a randomPatchExtractionDatastore that feeds training data to the network. ・Define the layers of the V-Net network.・Specify training options.・Train the network using the trainNetwork function.After training the V-Net network, the example performs semantic segmentation. The example evaluates the predicted segmentation by a visual comparison to the ground truth segmentation and by measuring the Dice similarity coefficient between the predicted and ground truth segmentation.[Japanese] 医用画像処理において、Deep Learningは非常に強力なアプローチの一つです。 本デモでは、3-D医用画像(ボリュームデータ)からの肺腫瘍のセマンティックセグメンテーション例をご紹介します。利用するネットワークはV-Netで、V-Netの作成、学習と評価までの流れでご紹介します。V-Netを学習させるまでの手順は以下の通りとなります。・学習用データのダウンロードと前処理・randomPatchExtractionDatastoreの作成 ・V-Netの定義・学習オプションの指定・trainNetwork関数によるV-Netの学習V-Netを学習した後、予め分割しておいたテストデータに対してセマンティックセグメンテーションを行い、結果の評価を行います。結果の可視化と、Dice類似係数による定量評価を行います。[Keyward] 画像処理・セグメンテーション・3次元・3-D・ディープラーニング・DeepLearning・デモ・IPCVデモ ・ニューラルネットワーク・医用画像

Three functions are included here: 1. phasewrap easily wraps data to the range -180 to 180 or -pi to pi. 2. phasemap is a constant-lightness cyclic colormap developed by Kristen Thyng. The constant lightness is good for displaying phase because it does not put strong emphasis on any part of the color map. A well-written and aesthetically-pleasing overview of Kristen's cmocean colormaps can be found here: http://matplotlib.org/cmocean/ 3. phasebar makes a circular colorbar.The phasemap colormap is from the cmocean package, and we've written a peer-reviewed paper about cmocean which has just come out in the journal Oceanography. If these phasemap is useful for you, please consider citing our paper:Thyng, K.M., C.A. Greene, R.D. Hetland, H.M. Zimmerle, and S.F. DiMarco. 2016. True colors of oceanography: Guidelines for effective and accurate colormap selection. Oceanography 29(3):9–13. http://dx.doi.org/10.5670/oceanog.2016.66

Given a URL the function will return a cell array of tables for every a HTML table exists in the source code.

Check the Examples Tab ^^ for function descriptions, syntax, etc. This is an Antarctic Mapping Tools plugin for MEaSUREs Antarctic Boundaries for IPY 2007-2009 from Satellite Radar, Version 2 (Mouginot et al., 2017). All the data are contained in this File Exchange upload, so you don't need to download the data from the NSIDC, but you can read the full details here: http://nsidc.org/data/NSIDC-0709. This toolbox contains several functions for masking based ice basins, or groundedness. Also some plotting functions to show grounding line, coast line, or ice basins. If this toolbox is helpful for you, please cite the following: The dataset: Mouginot, J., E. Rignot, and B. Scheuchl. 2017. MEaSURES Antarctic Boundaries for IPY 2007-2009 from Satellite Radar, Version 1. [Indicate subset used]. Boulder, Colorado USA. NASA National Snow and Ice Data Center Distributed Active Archive Center. doi:http://dx.doi.org/10.5067/AXE4121732AD.Literature citation:Rignot, E., S. S. Jacobs, J. Mouginot, and B. Scheuchl. 2013. Ice-shelf melting around Antarctica, Science. 341. 266-270. http://dx.doi.org/10.1126/science.1235798. Antarctic Mapping Tools: Chad A. Greene, David E. Gwyther, and Donald D. Blankenship. Antarctic Mapping Tools for Matlab. Computers & Geosciences. 104 (2017) pp. 151-157 http://dx.doi.org/10.1016/j.cageo.2016.08.003

Compute nearest neighbours (by Euclidean distance) to a set of points of interest from a set of candidate points.The points of interest can be specified as either a matrix of points (as columns) or indices into the matrix of candidate points.Points can be of any (within reason) dimension.nearestneighbour can be used to search for k nearest neighbours, or neighbours within some distance (or both)If only 1 neighbour is required for each point of interest, nearestneighbour tests to see whether it would be faster to construct the Delaunay Triangulation (delaunayn) and use dsearchn to lookup the neighbours, and if so, automatically computes the neighbours this way. This means the fastest neighbour lookup method is always used.A couple of examples:% Candidate pointsX = rand(2, 100);% Points of interestP = rand(2, 3);% Find the nearest neighbour to each column of P% where X(:, I(i)) is the neighbour to P(:,i)I = nearestneighbour(P, X)% Find the nearest 10 neighbours to each column of PI = nearestneighbour(P, X, 'NumberOfNeighbours', 10)% Find the nearest neighbours to the 2nd and 20th points in XI = nearestneighbour([2 20], X)% Find the neighbours in X which are within a radius of 0.2 from PI = nearestneighbour(P, X, 'Radius', 0.2)% Find the nearest neighbours to all columns of XI = nearestneighbour(X)

Check the Examples tab above for function contents, syntax, and examples ^ ^. Bedmap2 is a 1 km resolution dataset of Antarctic surface, ice thickness, and bed topography. Details about Bedmap2 can be found here:https://www.bas.ac.uk/project/bedmap-2/. This set of functions is a plugin for Antarctic Mapping Tools (Greene et al., 2017). References Fretwell, P., et al. "Bedmap2: improved ice bed, surface and thickness datasets for Antarctica." The Cryosphere 7.1 (2013). http://dx.doi.org/10.5194/tc-7-375-2013Chad A. Greene, David E. Gwyther, and Donald D. Blankenship. Antarctic Mapping Tools for Matlab. Computers & Geosciences. 104 (2017) pp. 151-157 http://dx.doi.org/10.1016/j.cageo.2016.08.003

There are two main methods for least squares ellipse fitting:1) Minimise algebraic distance, i.e. minimise sum(F(x)^2) subject to some constraint, where F(x) = x'Ax + b'x + cThis is a linear least squares problem, and thus cheap to compute. There are many different possible constraints, and these produce different fits. fitellipse supplies two:[z, a, b, al] = fitellipse(x, 'linear')[z, a, b, al] = fitellipse(x, 'linear', 'constraint', 'trace')See published demo file for more information. 2) Minimise geometric distance - i.e. the sum of squared distance from the data points to the ellipse. This is a more desirable fit, as it has some geometric meaning. Unfortunately, it is a nonlinear problem and requires an iterative method (e.g. Gauss Newton) to solve it. This is implemented as the default option in fitellipse. If it fails to converge, it fails gracefully (with a warning), returning the linear least squares estimate used to derive the start value[z, a, b, alpha] = fitellipse(x)plotellipse(z, a, b, alpha) can be used to plot the fitted ellipses

This example models a triplex pump with a predictive maintenance algorithm that can detect which parts of the pump are failing simply by monitoring the pump output pressure. The Simscape model of the pump can be configured to model degraded behavior due to seal leakage, blocked inlets, bearing wear, and broken motor windings. MATLAB code shows how to accelerate testing by reusing results from previous simulations. The model can be used to generate training data for the machine learning algorithm and can be used to test the deployed algorithm. MATLAB Live Scripts show you how to develop the algorithm.Mechanical, hydraulic, and electrical parameters are all defined in MATLAB which lets you easily resize the pump. The pump housing is imported from CAD.Please read the README.md file to get started.Use the "Download" button above to get files compatible with the latest release of MATLAB.You can try this example in MATLAB Online.Use the links below to get files compatible with earlier releases of MATLAB.For R2023b: Use Download button aboveFor R2023a: https://github.com/mathworks/Simscape-Triplex-Pump/archive/23.1.2.6.zipFor R2022b: https://github.com/mathworks/Simscape-Triplex-Pump/archive/22.2.2.6.zipFor R2022a: https://github.com/mathworks/Simscape-Triplex-Pump/archive/22.1.2.6.zipFor R2021b: https://github.com/mathworks/Simscape-Triplex-Pump/archive/21.2.2.5.zipFor R2021a: https://github.com/mathworks/Simscape-Triplex-Pump/archive/21.1.2.4.zipFor R2020b: https://github.com/mathworks/Simscape-Triplex-Pump/archive/20.2.2.2.zipFor R2020a: https://github.com/mathworks/Simscape-Triplex-Pump/archive/20.1.2.2.zipFor R2019b: https://github.com/mathworks/Simscape-Triplex-Pump/archive/19.2.2.0.zipFor R2019a: https://github.com/mathworks/Simscape-Triplex-Pump/archive/19.1.1.3.zipFor R2018b: https://github.com/mathworks/Simscape-Triplex-Pump/archive/18.2.1.2.zipFor R2018a: https://github.com/mathworks/Simscape-Triplex-Pump/archive/18.1.1.1.zipFor R2017b: https://github.com/mathworks/Simscape-Triplex-Pump/archive/17.2.1.0.zipSee how to model a fluid actuation system in Simscape (7 min): https://www.mathworks.com/videos/modeling-a-hydraulic-actuation-system-68833.htmlTry these free, hands-on tutorials to learn how to use Simscape:https://www.mathworks.com/learn/tutorials/simscape-onramp.htmlhttps://www.mathworks.com/learn/tutorials/circuit-simulation-onramp.htmlRead the e-book “Predictive Maintenance with MATLAB”https://www.mathworks.com/content/dam/mathworks/tag-team/Objects/p/93060v00_Predictive_Maintenance_e-book_v04.pdfFind other Simscape examples by searching posts for the keyword "physical modeling" http://www.mathworks.com/matlabcentral/fileexchange/?term=%22physical+modeling%22 Learn more about MathWorks Simscape Products: http://www.mathworks.com/physical-modeling/

[![View Pixel Grid on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/71622-pixel-grid) [![Open in MATLAB Online](https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](https://matlab.mathworks.com/open/github/v1?repo=eddins/pixelgrid&file=toolbox/gettingStarted.mlx)# Pixel GridThe MATLAB function `pixelgrid` superimposes a grid of pixel edges on an image. The purpose is to easily visualize pixel extents when zooming in closely on an image. When viewing an image with a very high zoom factor, the grid is useful for determining the extent of each pixel, especially in regions where pixels have the same or very similar colors.The pixel grid automatically becomes visible when the image pixels are larger than a certain size on the display.![screen shot](misc/pixel-grid-screenshot.png)## InstallationDownload the `.mltbx` file from the [GitHub repository releases area](https://github.com/eddins/pixelgrid/releases/) or from the [File Exchange](https://www.mathworks.com/matlabcentral/fileexchange/71622-pixel-grid?s_tid=ta_fx_results). Double-click on the downloaded file to automatically and run the MATLAB add-on installer. This will copy the files to your MATLAB add-ons area and add `pixelgrid` to your MATLAB search path.Later, you can use the [MATLAB Add-On Manager](https://www.mathworks.com/help/matlab/matlab_env/get-add-ons.html) to uninstall.## Getting StartedSee the [Getting Started](https://www.mathworks.com/matlabcentral/fileexchange/71622-pixel-grid) script for more information.Copyright © 2024 Steven L. Eddins

ribboncoloredZ is a wrapper of buitlin ribbon() and color ribbons according to Z values and axes' colormap.h = ribboncoloredZ(y)h = ribboncoloredZ(y,z)h = ribboncoloredZ(y,z,width)h = ribboncoloredZ(axh,_____)INPUT ARGUMENTSy,z y can be a matrix whose columns are plotted as separate ribbons. Or, when y and z are provided, they are vectors of the same size.width (default) 0.75 (Optional) Width of ribbons in X axisOUTPUT ARGUMENTSh Graphic handle vector of surface objectsSee alsoribbon, surface, colormap, ribboncoloredZ_scriptEXAMPLE USAGE[x,y] = meshgrid(-3:.5:3,-3:.1:3);z = peaks(x,y);ribboncoloredZ(y,z);xlabel('X');ylabel('Y');zlabel('Z');ribboncoloredZ_script.mlx included in the zip file illustrates the outcome of the above example.https://www.mathworks.com/matlabcentral/fileexchange/57909-ribboncoloredz-m/content/ribboncoloredZ_scrpit.mlxSee alsohttp://stackoverflow.com/questions/8544823/how-to-make-colour-indicate-amplitude-in-matlabs-ribbon-plot

Given a gridded surface Z corresponding to X and Y, this function will replace points in Z with NaN (or any other value you declare) if they are farther than maxdist from any point given by x,y. See the demo file for a example.

THIS FILE IS OUT OF DATE. The current, more efficient version is in the Climate Data Toolbox here: https://www.mathworks.com/matlabcentral/fileexchange/70338.

h = vfill(xbounds,ColorSpec,varargin) creates fill objects bounded by the values xbounds. ColorSpec defines the color of the fill objects. Optional varargin can be used to set edgecolor, transparency, etc. Syntaxhfill(scalarValue)hfill([ystart yend])hfill([ystart1,yend1,ystart2,yend2,...,ystartn,yendn])hfill(...,ColorSpec)hfill(...,ColorSpec,'PatchProperty','PatchValue')hfill(...,'bottom')h = hfill(...)Descriptionhfill(scalarValue) places a horizontal line along y = scalarValue.hfill([ystart yend]) fills a horizontal shaded region bounded by ystart and yend.hfill([ystart1,yend1,ystart2,yend2,...,ystartn,yendn]) fills multiple horizontal regions.hfill(...,ColorSpec) defines the face color of the patch(es) created by hfill. ColorSpec can be one of the Matlab color names (e.g. 'red'), abbreviations (e.g. 'r', or rgb triplet (e.g. [1 0 0]). ColorSpec may also be 'gray'.hfill(...,ColorSpec,'PatchProperty','PatchValue') defines patch properties such as 'EdgeColor' and 'FaceAlpha'.hfill(...,'bottom') places the newly created patch(es) at the bottom of the uistack.h = hfill(...) returns handle(s) of newly created patch objects.

This submission contains the basic functions that are necessary for using the matrix approach to discretization of fractional differential equations, and demos. The method is described in the following articles:[1] I. Podlubny, "Matrix approach to discrete fractional calculus", Fractional Calculus and Applied Analysis, vol. 3, no. 4, 2000, pp. 359-386 (http://people.tuke.sk/igor.podlubny/pspdf/ma2dfc.pdf ).[2] I. Podlubny, A. Chechkin, T. Skovranek, YQ. Chen, B. M. Vinagre Jara, "Matrix approach to discrete fractional calculus II: partial fractional differential equations", Journal of Computational Physics, vol. 228, no. 8, 1 May 2009, pp. 3137-3153, http://dx.doi.org/10.1016/j.jcp.2009.01.014 (preprint: http://arxiv.org/abs/0811.1355 ).For more information about fractional differential equations (i.e., differential equations containing derivatives of arbitrary real order) see, for example, [3] I. Podlubny, Fractional Differential Equations, Academic Press, San Diego, 1999, ISBN 0125588402. ======================Update notes 2008-11-27:(1) Added a tutorial article (in the form of a "published m-file") with examples. The examples include: evaluation of integer-order derivatives; evaluation of left-sided and right-sided Riemann-Liouville fractional derivatives; evaluation of symmetric fractional derivatives (symmetric Riesz derivatives); solution of a fractional integral equation with Riesz kernel; solution of an ordinary fractional differential equation (the Bagley-Torvik equation); solution of a partial fractional differential equation (fractional diffusion equation); solution of a partial fractional differential equation with delayed fractional derivatives (fractional diffusion equation with delayed fractional derivative).(2) Added two demo functions (bagleytorvikequation.m and rieszpotential.m)(3) Updated the title of this submission by adding the words "of arbitrary real order". ======================Update notes 2008-12-04:(1) Corrected typos in the description.(2) Deleted unused files in 'html' directory.(3) Low quality PNG images of equations in the tutorial, that were generated by Matlab when "publishing to HTML", are replaced with PNG images of good quality obtained using TeX.======================Update notes 2009-01-07:Spelling corrections in the "published m-file" and in descriptions inside the functions.======================Update notes 2009-02-05:Added journal reference.======================Update notes 2009-04-24:Updated function fracdiffdemou.m(thanks to Dr. Mridula Garg, University of Rajasthan)

The toolbox contains two functions:(a) getMarketDataViaYahoo() % INPUT: % symbol - is a ticker symbol i.e. 'AMD', 'BTC-USD' % startdate - the market data will be requested from this data % enddate - the market data will be requested till this date % interval - the market data will be returned in this intervals % supported intervals are '1d', '5d', '1wk', '1mo', '3mo' % % OUTPUT: % data - is a retrieved dataset returned as a tabledata = getMarketDataViaYahoo('AMD', '1-Jan-2018', datetime('today'), '5d'); % Downloads AMD share historic price(b) getMarketDataViaQuandl() % INPUT: % set_name - is a dataset name e.g. 'WIKI/AAPL' % startdate - the market data will be requested from this data % enddate - the market data will be requested till this date % collapse - the market data will be returned in this intervals % supported intervals are 'daily', 'weekly', 'monthly', 'quarterly', 'annual' % key - user's api key % % OUTPUT: % data - is a retrieved dataset returned as a tableopec_orb_raw = getMarketDataViaQuandl('OPEC/ORB', '1-Jan-2018', date(), 'weekly'); % Downloads historic OPEC basket price from QuandlFor a complete list of free datasets provided by Quandl check https://www.quandl.com/search?filters=%5B%22Free%22%5DExamples:(a) Yahoo Finance disp('Request historical YTD Bitcoin price and plot Close, High and Low');initDate = '1-Jan-2018';symbol = 'BTC-USD';btcusd = getMarketDataViaYahoo(symbol, initDate);btcusdts = timeseries([btcusd.Close, btcusd.High, btcusd.Low], datestr(btcusd(:,1).Date));btcusdts.DataInfo.Units = 'USD';btcusdts.Name = symbol;btcusdts.TimeInfo.Format = "dd-mm-yyyy";plot(btcusdts);legend({'Close', 'High', 'Low'});(b) Quandldataset = 'LBMA/GOLD';initDate = '1-Jan-2018';lbma_gold_raw = getMarketDataViaQuandl(dataset, initDate, date(), 'daily');lbma_gold_ts = timeseries(lbma_gold_raw.("EURO(AM)"), datestr(lbma_gold_raw.Date));lbma_gold_ts.DataInfo.Units = 'USD';lbma_gold_ts.Name = dataset;lbma_gold_ts.TimeInfo.Format = "dd-mm-yyyy";figure, plot(lbma_gold_ts);

The Electrocardiogram Live Script uses the Signal Processing Toolbox to find peaks of data from an EKG and shows how to refine the peaks based on your data. The Live Script also shows how to gather data from various sources, including data from a web site, and some tips on visualizing complex data in MATLAB figures to help see critical regions, such as peaks, more clearly. In addition, it illustrates how to infer heart rate from the peaks of the Electrocardiogram data. Submitted as part of the MATLAB Online Live Editor Challenge 2018.

This example use https://www.mathworks.com/help/econ/var-model-case-study.html as reference.Highlights : Loading data from FRED and transforming the data for stationarityPartitioning the transformed data into presample, estimation, and forecast intervalsMaking several modelsFitting the models to the dataDeciding models with various back-testing techniquesMaking forecasts based on the best modelProduct Focus :MATLABDataFeed Toolbox (Computational Finance Suite)Econometric Toolbox (Computational Finance Suite)[Note : Not advocating any particular strategy, factors or methodology]

Modeling operations often perturb a model's layout. Layout readjustment is usually needed, and represents a tedious activity if performed manually. Although achieving a proper layout of a Simulink model is deemed very important, there does not exist a comprehensive commercial automatic layout tool for Simulink models. The Auto Layout Tool resizes models' blocks based on number of inputs and outputs, and organizes the signal lines such that the number of crossings is minimized. Auto Layout Tool can leverage three different layout approaches: 1) "Graphviz", a third-party open source tool for drawing graphs; 2) Matlab’s built-in "GraphPlot" layout capability; 3) an in-house "DepthBased" method. Approaches 1) and 3) can be utilized on any version of Matlab/Simulink, while approach 2) only works on R2015b+.• For installation instructions and instructions on how to use the tool, see Auto-Layout/doc/AutoLayout_UserGuide.pdf.• This tool relies on our Simulink Utility. Please download it here: https://github.com/McSCert/Simulink-Utility.For more about the capabilities of the tool and how it can be used in model-based development with Simulink, see the following two papers:[1] Vera Pantelic, Steven Postma, Mark Lawford, Alexandre Korobkine, Bennett Mackenzie, Jeff Ong, Marc Bender, "A Toolset for Simulink: Improving Software Engineering Practices in Development with Simulink," In Proceedings of 3rd International Conference on Model-Driven Engineering and Software Development (MODELSWARD 2015), SCITEPRESS, 2015, 50-61. DOI: https://doi.org/10.5220/0005236100500061 (Best Paper Award)[2] Vera Pantelic, Steven Postma, Mark Lawford, Monika Jaskolka, Bennett Mackenzie, Alexandre Korobkine, Marc Bender, Jeff Ong, Gordon Marks, Alan Wassyng, “Software engineering practices and Simulink: bridging the gap,” International Journal on Software Tools for Technology Transfer (STTT), 2017, 95–117. DOI: https://doi.org/10.1007/s10009-017-0450-9

The code provides hands-on examples to implement convolutional neural networks (CNNs) for object recognition. The three demos have associated instructional videos that will allow for a complete tutorial experience to understand and implement deep learning techniques. The demos include:- Training a neural network from scratch- Using a pre-trained model (transfer learning)- Using a neural network as a feature extractor The corresponding videos for the demos are located here: https://www.mathworks.com/videos/series/deep-learning-with-MATLAB.htmlThe use of a GPU and Parallel Computing Toolbox™ is recommended when running the examples. Demo 3 requires Statistics and Machine Learning Toolbox™ in addition to the required products below.

This example shows how to import trained network from Darknet and how to assemble it for image classification. Importer included in this submission can be used to import trained network such as Darknet19 and Darknet53 that are well known as feature extractor for YOLOv2 and YOLOv3.Please see Live script - tb_darknet2ml.mlx(Live Script) that shows how to import trained network from Darnket and how to assemble it for image classification. And also, importer can be used to import YOLO for object detection, but post processing to produce object detections need to be added outside this example.[Japanese] 本例題では、Darknet上で学習されたネットワークをMATLABにインポートしてDAG Networkオブジェクトに変換し、画像分類を行う流れをご紹介しています。本例題に含まれるImporterを利用することで、YOLOv2やYOLOv3の特徴抽出器として著名なDarknet19やDarknet53をインポートして利用することができます。一連の流れをLive Script - tb_darknet2ml.mlxでご紹介していますのでご覧ください。また、Importerを利用してYOLOv2等の物体検出用ネットワークをインポートすることもできますが、別途後処理を記述する必要があります。[Keyward] 画像処理・画像分類・物体検出・ディープラーニング・DeepLearning・デモ・IPCVデモ ・Darknet・Darknet53・Darknet19・YOLOv2・YOLOv3