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.

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;

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.

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.

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

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.

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!

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.

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).

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.

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.

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.

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

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.

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

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

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.

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

A live script that describes how finite difference methods works solving heat equations.

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デモ ・ニューラルネットワーク・医用画像

The webinar highlights how MATLAB can supplement the capabilities of Excel by providing access to thousands of pre-built engineering and advanced analysis functions and versatile visualization tools. The code demonstrates the following concepts using vehicle fuel economy data: • Access data from spreadsheets• Plot data and customize figures• Perform statistical analysis and fitting• Automatically generate reports to document your analysis• Create your own Apps and distribute themMain script is "MainAnalysisLive.mlx" and requires the data folder "dataXLS" to be on the same path.Additional file (AutomateAnalysis) shows how to run model over multiple files and collect the results.

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

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

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

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

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

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.

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)

The 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. The grid is drawing using lines with contrasting colors so that it is visible regardless of the colors of the underlying pixels.

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

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

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 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.Use the links below to get files compatible with earlier releases of MATLAB.For R2022b: Use Download button aboveFor R2022a: https://github.com/mathworks/Simscape-Triplex-Pump/archive/22.1.2.5.zipFor R2021b: https://github.com/mathworks/Simscape-Triplex-Pump/archive/21.2.2.4.zipFor R2021a: https://github.com/mathworks/Simscape-Triplex-Pump/archive/21.1.2.3.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.1.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/

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

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

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.

Linear regression attempts to model the relationship between two variables by fitting a linear equation to observed data. One variable is considered to be an explanatory variable, and the other is considered to be a dependent variable. For example, a modeler might want to relate the weights of individuals to their heights using a linear regression model.Before attempting to fit a linear model to observed data, a modeler should first determine whether or not there is a relationship between the variables of interest. This does not necessarily imply that one variable causes the other (for example, higher SAT scores do not cause higher college grades), but that there is some significant association between the two variables. A scatterplot can be a helpful tool in determining the strength of the relationship between two variables. If there appears to be no association between the proposed explanatory and dependent variables (i.e., the scatterplot does not indicate any increasing or decreasing trends), then fitting a linear regression model to the data probably will not provide a useful model. A valuable numerical measure of association between two variables is the correlation coefficient, which is a value between -1 and 1 indicating the strength of the association of the observed data for the two variables.A linear regression line has an equation of the form Y = a + bX, where X is the explanatory variable and Y is the dependent variable. The slope of the line is b, and a is the intercept (the value of y when x = 0).Reference:(1) https://www.iist.ac.in/sites/default/files/people/in12167/linear_regression.pdf(2) Andrew Ng’s lecture note (CS 229)(3) http://www.stat.yale.edu/Courses/1997-98/101/linreg.htmCheck more Machine Learning stuff:1. AdaBoost https://in.mathworks.com/matlabcentral/fileexchange/63156-adaboost2. SVM using various kernels https://in.mathworks.com/matlabcentral/fileexchange/63033-svm-using-various-kernels3. SVM for nonlinear classification https://in.mathworks.com/matlabcentral/fileexchange/63024-svm-for-nonlinear-classification4. SMO https://in.mathworks.com/matlabcentral/fileexchange/63100-smo--sequential-minimal-optimization-5. Support Vector regressionhttps://in.mathworks.com/matlabcentral/fileexchange/63060-support-vector-regression6. Maze Solver using SARSAhttps://in.mathworks.com/matlabcentral/fileexchange/63089-sarsa-reinforcement-learning7. Gauss-Seidel Method, Jacobi Method https://in.mathworks.com/matlabcentral/fileexchange/63167-gauss-seidel-method--jacobi-method

This is an example of how to create an inset plot within another plot in MATLAB®.Read about the "axes" function in the MATLAB documentation.For more examples, go to MATLAB Plot Gallery - http://www.mathworks.com/discovery/gallery.html

The files are designed to show how to perform portfolio optimization, obtain optimal portfolio, and visualize efficient frontier. The video demo is located here: https://www.mathworks.com/videos/getting-started-with-portfolio-optimization-68762.htmlNote that you need to download labelpoints from FileExchange too.

These are the files for the "MATLAB for New Users" webinar which debuted in February 2017. This webinar introduces MATLAB as a platform, langauge, and development environment as well as how it can be used for data analysis and automation even without prior programming experience.

If you have a 2D CONVEX polygone and you want to create uniform point indise it, you can use randPolygone. The function is based on another (provided) function randTriangle that work on triangle.Uniform means each area of your polygone has the same chance to be taken.Here are some examples: triangle = [0,0;10,0;2,3]; losange = [0,0;2 ,1;0,2;-2,1]; carre = [0,0;2 ,0;2,2; 0,2]; hexagone = [0,0;1,0;10,1;30,8;20,8;0,5]; dodecagone = [cos(linspace(0,2*pi,13))',... sin(linspace(0,2*pi,13))']; dodecagone(end,:) = [] ; rTriangle=randPolygone(triangle,1e4); rLosange=randPolygone(losange,1e4); rHexagone=randPolygone(hexagone,1e4); rCarre=randPolygone(carre,1e4); rDodecagone=randPolygone(dodecagone ,1e4); figure scatter(rTriangle(:,1),rTriangle(:,2),'.')

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

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.

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/

Fourier Analysis or Curriculum ModuleCreated with R2021b. Compatible with R2021b and later releases.DescriptionThis curriculum module teaches Fourier analysis using interactive live scripts and MATLAB® apps. The 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.Each topic includes a lab that applies the concepts taught in the lesson. The solutions are available upon instructor request. If you would like to request solutions or have a question, contact the MathWorks online teaching team.Get started with the Fourier Analysis curriculum module by downloading and unzipping the repository. Then, double-click the project .prj file inside MATLAB. From there, you can follow the landing page instructions to get started with the examples and labs.Details Module Learning Goals 1. Fourier Series 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. 2. Complex Fourier Series Recall Euler's formula. Compare complex and real Fourier series. Visualize complex Fourier series. Construct functions using complex Fourier series. 3. Fourier Transform Compare Fourier series to the Fourier transform. Evaluate the Fourier transform of a function. Represent signals using continuous functions. Discuss carrier waves and modulation. Compare functions in the time and frequency domains using the Fourier transform. 4. Discrete Fourier Transform Plot the discrete Fourier transform (DFT). Use the fft function to compute the DFT. Relate the DFT to the Fourier transform. Apply the DFT to analyze an audio signal. Apps Sine and Cosine Series Fourier Series Magnitude and Phase Complex Fourier Series Suggested PreworkMATLAB Onramp – a free two-hour introductory tutorial that teaches the essentials of MATLAB.ProductsMATLAB, Symbolic Math Toolbox™LicenseThe license for this module is available in the LICENSE.md file in this GitHub repository.Educator ResourcesFeatured CoursewareTeach with MATLAB and SimulinkMATLAB GraderCopyright 2022 The MathWorks, Inc.

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.

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.

Most bifurcation diagrams for continuous-time dynamical systems are based on analysis of local maxima. In fact we must also consider the minima. We present a program applied to the Rössler system. But it is valid for any other model of this kind.

elfun18 is a collection of Matlab functions that enable the computation of wide set of Elliptic integrals, Jacobi's elliptic functions and Jacobi's theta functions for real arguments. The set has two levels: higher level functions with matrix arguments and low level functions with scalar arguments. Each function is available either with the modulus k or parameter m as argument. In later case the function name begin with m. Incomplete elliptic integrals are given in Jacobi form, Legendre form and Jacobi's second form (Epsilon function and Lambda functions). List of functions:Elliptic integrals: - Bulirsch's elliptic integrals: cel, cel1, cel2, cel3, el1, el2, el3 - Carlson's elliptic integrals: rc, rd, rf, rg, rj - Complete elliptic integrals: B, C, D, K, E, Pi - Complementary complete elliptic integrals: K', E', Pi' - Jacobi form of elliptic integrals: B, D, E, F, Pi - Legendre form of elliptic integrals: B, D, E, F, Pi - Jacobi second form of elliptic integrals: Epsilon, Zeta ( periodic part of Eps) Lambda ( elip. int. of 3rd kind), Omega function ( periodic part of Lambda) Jacobian elliptic functions - am, cd, cn, cs, dc, dn, ds, nc, nd, ns, sc, sd, sn Inverse Jacobian elliptic functions - invam, invcd, invcn, invcs, invdc, invdn, invds, invnc, invnd, invns, invsc, invsd, invsn Jacobi Theta Functions - theta1, thet12, theta3, theta4, nome, modulusNeville theta functions -nthetac, nthetad, nthetan, nthetas Misc. functions - agm ( arithmetic geometric mean), cl (lemniscate cos), sl, (lemniscate sin), invcl (inverse lemniscate cos), invsl (inverse lemniscate sin), Lambda0 (Heuman's function) gd (Gudermannian function), invgd (inverse Gudermannian function)

regularizeNd Fits a nD lookup table with smoothness to scattered data. Constraints are possible. regularizeNd answers the question what is the best possible lookup table that the scattered data input x and output y in the least squares sense with smoothing? regularizeNd is meant to calculate a smooth lookup table given n-D scattered data. regularizeNd supports extrapolation from a scattered data set. The calculated lookup table, yGrid, is meant to be used with griddedInterpolant class with the conservative memory form. Call griddedInterpolant like xGrid = cell array of grid vectors smoothness = smoothness value or vector yGrid = regularizeNd(xData, yData, xGrid, smoothness); F = griddedInterpolant(xGrid, yGrid). Desirable properties of regularizeNd: -Calculates a relationship between the input x and the output y without definition of the functional form of x to y. -Often the fit is superior to polynomial type fitting without the wiggles. -Extrapolation is possible from a scattered data set. -After creating the lookup table yGrid and using it with griddedInterpolant, as the query point moves away from the scattered data, the relationship between the input x and output y becomes more linear because of the smoothness equations and no nearby fidelity equations. The linear relationship is a good choice when the relationship between x and y is unknown in extrapolation. -regularizeNd can handle 1D, 2D, nD input data to 1D output data. RegularizeData3D and gridfit can only handle 2D input and 1D out (total 3D). -regularizeNd can handle setting the smoothness to 0 in any/some axis/dimension. This means no smoothing is applied in a particular axis/dimension and the data is just a least squares fit of a lookup table in that axis/dimension. Note this is not recommended and often can lead to an ill-conditioned fitting problem. However, I have found it useful so I left this as an option. - Constraints are possible with the function regularizeNdMatrices. See the example.The source code is locate here: https://github.com/jasonnicholson/regularizeNdFor an introduction on how regularization of a lookup table works, start here: https://mathformeremortals.wordpress.com/2013/01/29/introduction-to-regularizing-with-2d-data-part-1-of-3/Acknowledgement Special thanks to Peter Goldstein, author of RegularizeData3D, for his coaching and help through writing regularizeNd.

Beginning in MATLAB R2018a, you can create durations from text using the duration function and import functions. The text2duration function is intended to provide similar functionality for earlier releases. It may also be used to convert text timestamps in some formats not recognized by the duration function.

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.

TireDataAnalysis.mlx processes tire test data from acceleration and brake as well as cornering tests and returns the Pacejka’s Magic Formula coefficients for both a longitudinal and lateral model.

Before there was floating point, or a way to write zero, or algebraic notation, Archimedes bounded the value of pi by estimating the perimeter of regular polygons inside and outside the circle. His computation is repeated and explained here using MATLAB.

Numerical Methods (single step and multi step) for solving First Order Ordinary Differential Equations. Methods included: 1. Euler's Method 2. Heun's Method 3. Fourth Order Runge Kutta methods 4. Adams-Bashforth Method 5. Adams-Moulton Method These methods are commonly used for solving IVP, a first order Initial Value Problem (IVP) is defined as a first order differential equation together with specified initial condition at t=t₀:y' = f(t,y) ;t0 ≤ t ≤ b with y(t₀) = y₀There exist several methods for finding solutions of differential equations.Reference: http://nptel.ac.in/courses/111107063/

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.