tag:www.mathworks.com,2005:/matlabcentral/fileexchange/feedMATLAB Central File Exchangeicon.pnglogo.pngMATLAB Central - File Exchange - type:ExampleUser-contributed code library2015-03-30T22:52:11-04:006741100tag:www.mathworks.com,2005:FileInfo/502322015-03-27T21:21:09Z2015-03-30T19:03:17ZMachine Learning Made EasyMATLAB files from the webinar<p>These files accompany the 'Machine Learning Made Easy' webinar which can be viewed here:
<br /><a href="http://www.mathworks.com/videos/machine-learning-with-matlab-81984.html">http://www.mathworks.com/videos/machine-learning-with-matlab-81984.html</a>
<br />About the webinar:
<br />Machine learning is ubiquitous. From medical diagnosis, speech, and handwriting recognition to automated trading and movie recommendations, machine learning techniques are being used to make critical business and life decisions every moment of the day. Each machine learning problem is unique, so it can be challenging to manage raw data, identify key features that impact your model, train multiple models, and perform model assessments.
<br />In this session we explore the fundamentals of machine learning using MATLAB®.
<br />Highlights include:
<br />• Accessing, exploring, analyzing, and visualizing data in MATLAB
<br />• Using the Classification Learner app and functions in the Statistics and Machine Learning Toolbox® to perform common machine learning tasks such as:
<br /> o Feature selection and feature transformation
<br /> o Specifying cross-validation schemes
<br /> o Training a range of classification models, including support vector machines (SVMs), boosted and bagged decision trees, k-nearest neighbor, and discriminant analysis
<br /> o Performing model assessment and model comparisons using confusion matrices and ROC curves to help choose the best model for your data
<br />• Integrating trained models into applications such as computer vision, signal processing, and data analytics.</p>Shashank Prasannahttp://www.mathworks.com/matlabcentral/profile/authors/2963954-shashank-prasannaMATLAB 8.5 (R2015a)Statistics ToolboxComputer Vision System Toolboxfalsetag:www.mathworks.com,2005:FileInfo/466372014-05-16T11:40:09Z2015-03-30T05:06:58ZA Simple Finite Volume Solver for MatlabA simple yet general purpose FVM solver for transient convection diffusion PDE<p>A simple Finite volume tool
<br />This code is the result of the efforts of a chemical/petroleum engineer to develop a simple tool to solve the general form of convection-diffusion equation:
<br />α∂ϕ/∂t+∇.(uϕ)+∇.(−D∇ϕ)+βϕ=γ
<br />on simple uniform mesh over 1D, 1D axisymmetric (radial), 2D, 2D axisymmetric (cylindrical), and 3D domains.
<br />The code accepts Dirichlet, Neumann, and Robin boundary conditions (which can be achieved by changing a, b, and c in the following equation) on a whole or part of a boundary:
<br />a∇ϕ.n+bϕ=c.
<br />It also accepts periodic boundary conditions.
<br />The main purpose of this code is to serve as a handy tool for those who try to play with mathematical models, solve the model numerically in 1D, compare it to analytical solutions, and extend their numerical code to 2D and 3D with the minimum number of modifications in the 1D code.
<br />The discretizaion schemes include
<br /> * central difference
<br /> * upwind scheme for convective terms
<br /> * TVD schemes for convective terms</p>
<p>A short html document is available to get you started. Simply type
<br />showdemo FVTdemo
<br />after downloading and extracting the code.</p>
<p>A few calculus functions (divergence, gradient, etc) and averaging techniques (arithmetic average, harmonic average, etc) are available, which can be helpful specially for solving nonlinear or coupled equations or implementing explicit schemes.</p>
<p>I have used the code to solve coupled nonlinear systems of PDE. You can find some of them in the Examples/advanced folder.</p>
<p>There are a few functions in the 'PhysicalProperties' folder for the calculation of the physical properties of fluids. Some of them are not mine, which is specified inside the file.</p>
<p>I'll try to update the documents regularly, in the github repository. Please give me your feedback/questions by writing a comment in my weblog: <<a href="http://fvt.simulkade.com/">http://fvt.simulkade.com/</a>>
<br />Special thanks: I vastly benefited from the ideas behind Fipy <<a href="http://www.ctcms.nist.gov/fipy/">http://www.ctcms.nist.gov/fipy/</a>>, a python-based finite volume solver.</p>
<p>To start the solver, download and extract the zip archive, open and run 'FVToolStartUp' function.
<br />To see the code in action, copy and paste the following in your Matlab command window:</p>
<p>clc; clear;
<br />L = 50; % domain length
<br />Nx = 20; % number of cells
<br />m = createMesh3D(Nx,Nx,Nx, L,L,L);
<br />BC = createBC(m); % all Neumann boundary condition structure
<br />BC.left.a(:) = 0; BC.left.b(:)=1; BC.left.c(:)=1; % Dirichlet for the left boundary
<br />BC.right.a(:) = 0; BC.right.b(:)=1; BC.right.c(:)=0; % Dirichlet for the right boundary
<br />D_val = 1; % value of the diffusion coefficient
<br />D = createCellVariable(m, D_val); % assign the diffusion coefficient to the cells
<br />D_face = harmonicMean(m, D); % calculate harmonic average of the diffusion coef on the cell faces
<br />Mdiff = diffusionTerm(m, D_face); % matrix of coefficients for the diffusion term
<br />[Mbc, RHSbc] = boundaryCondition(m, BC); % matix of coefficients and RHS vector for the BC
<br />M = Mdiff + Mbc; % matrix of cefficients for the PDE
<br />c = solvePDE(m,M, RHSbc); % send M and RHS to the solver
<br />visualizeCells(m, c); % visualize the results</p>
<p>You can find some animated results of this code in my youtube channel:
<br /><a href="https://www.youtube.com/user/processsimulation/videos">https://www.youtube.com/user/processsimulation/videos</a></p>Ehsanhttp://www.mathworks.com/matlabcentral/profile/authors/2336153-ehsanMATLAB 8.3 (R2014a)MATLAB35710falsetag:www.mathworks.com,2005:FileInfo/496922015-02-12T18:47:15Z2015-03-30T05:05:21ZgptoolboxUseful functions for geometry processing, constrainted optimization and image processing.<p><a href="https://github.com/alecjacobson/gptoolbox/">https://github.com/alecjacobson/gptoolbox/</a>
<br />This is a toolbox of useful matlab functions for geometry processing. There are also tools related to constrainted optimization and image processing. Typically these are utility functions that are not stand alone applications.
<br />Here's an incomplete list of cool features this matlab toolbox contains:</p>
<p> - wrappers for TetGen, Triangle, QSlim, meshfix
<br /> - mesh smoothing
<br /> - mesh clean up (remove duplicates, remove unreferenced)
<br /> - geodesic distances on triangle and tetrahedral meshes
<br /> - mesh quantities and queries (normals, discrete gaussian curvature, list boundary edges, topology, angles, dihedral angles etc.)
<br /> - mesh deformation (as-rigid-as-possible (ARAP), moving least-squares, etc.)
<br /> - mesh parameterization (harmonic, least squares conformal, ARAP, etc.)
<br /> - automatic skinning weight computation (bounded biharmonic weights, bone heat)
<br /> - 2D triangle mesh from binary image
<br /> - Input/Output for many mesh formats (.obj,.off,.stl,.wrl,.ply,.mesh,.node,.ele,.poly,.smf,.bdl,.face)
<br /> - discrete differential geometry operators for triangle and tetrahedral meshes (cotangent Laplacian, gradient, divergence)
<br /> - quadratic programming, active set solver
<br /> - scribble-based image colorization, diffusion curves
<br /> - exact (un)signed distance field computation for meshes
<br /> - constructive solid geometry operations on meshes, booleans
<br /> - accelerated point location in triangle and tetrahedral meshes
<br /> - image dithering
<br /> - deep matlab function dependency</p>Alechttp://www.mathworks.com/matlabcentral/profile/authors/5297920-alecMATLAB 8.4 (R2014b)Aerospace ToolboxImage Processing ToolboxMost of gptoolbox is pure matlab. There are a few functions that expect the image processing toolbox or aerospace toolbox to be installed. There are also a few mex functions which have other dependencies: stl, eigen, libigl, boost, cgal, cork.5355falsetag:www.mathworks.com,2005:FileInfo/470082014-06-20T01:13:29Z2015-03-29T05:06:17ZBiMatA MatLab framework to facilitate the analysis of bipartite complex networks<p>BiMat is a MATLAB library whose main function is the analysis of modularity
<br />and nestedness in bipartite ecological networks. Its main features are:
<br />* Modularity and nestedness calculation.
<br />* Diversity calculation using Shannon and Simpson's indexes.
<br />* Different null models for the creation of random bipartite networks.
<br />* Statistics of the network.
<br />* Internal statistics of the modules (multi-scale analysis).
<br />* Group statistical analysis (analysis of many networks).
<br />* Parallel processing for improving the speed during a statistical analysis.
<br />* Plotting in matrix or graph layouts.
<br />Authors:
<br />This project has been developed by:
<br />* [Cesar Flores](mailto:<a href="mailto:cesar.flores@gatech.edu">cesar.flores@gatech.edu</a>)</p>
<p>This project received contributions of Sergi Valverde, Joshua S Weitz & Tim Poisot (<a href="http://timotheepoisot.fr/">http://timotheepoisot.fr/</a>). For a Python version that contains
<br />some of the BiMat features you may want to check: <a href="https://github.com/tpoisot/BiWeb">https://github.com/tpoisot/BiWeb</a></p>
<p>Please, feel free to report bugs on:</p>
<p><a href="https://github.com/cesar7f/BiMat/issues">https://github.com/cesar7f/BiMat/issues</a></p>César Flores Garcíahttp://www.mathworks.com/matlabcentral/profile/authors/2373385-cesar-flores-garciaMATLAB 8.0 (R2012b)MATLABfalsetag:www.mathworks.com,2005:FileInfo/498202015-02-25T12:41:49Z2015-03-29T05:05:08ZThe MCMC Hammer, gwmcmcMarkov Chain Monte Carlo sampling of posterior distribution<p>An implementation of the Goodman & Weare MCMC sampler for matlab</p>Aslak Grinstedhttp://www.mathworks.com/matlabcentral/profile/authors/870202-aslak-grinstedMATLAB 8.4 (R2014b)MATLAB47912falsetag:www.mathworks.com,2005:FileInfo/503272015-03-28T23:12:23Z2015-03-28T23:12:23ZSold Earth Tide PredictionsA Matlab wrapper for Milbert's DOS version of Dehant's Fortran code.<p>This function returns vertical and horizontal displacement components (not gravitational force potential) for solid earth tides from 1980 to 2015. This function requires MS Windows.</p>Chad Greenehttp://www.mathworks.com/matlabcentral/profile/authors/1062128-chad-greeneMATLAB 8.4 (R2014b)MATLABRequires Microsoft Windows to run the .exe file.falsetag:www.mathworks.com,2005:FileInfo/498082015-02-24T12:35:38Z2015-03-28T11:34:41ZQR Code Generator 1.1 based on zxingQR Code generator 1.1 can generatre QR-Codes based on the zxing library.<p>QR Code generator can generate QR-Codes based on the zxing library. All files can be imported on the fly from a maven repository or can be downloaded via a command. Zxing is an open source project so it also possible to include your self-compliled files if you have security issues.</p>Jens Richterhttp://www.mathworks.com/matlabcentral/profile/authors/4830863-jens-richterMATLAB 8.5 (R2015a)MATLABQR-Code Generator needs at least Matlab2014a to be installed.41437falsetag:www.mathworks.com,2005:FileInfo/502162015-03-25T08:51:45Z2015-03-27T14:55:28ZF14 H-Infinity Loop-Shaping Design ExampleIllustration of H-infinity loop-shaping with Robust Control Toolbox<p>This example illustrates the use of Robust Control Toolbox to design a controller using the Glover-McFarlane H-infinity loop-shaping method. This control design method is conceptually similar to Bode's frequency-response methods. H-infinity loop-shaping can be applied to multivariable design problems, and uses optimization to produce robust performance and stabilization.
<br />There are two Simulink models: one is a standalone plant model for linearization, and the other is the full closed-loop model with the closed-loop controller and an external disturbance model. The design is performed using a MATLAB script - this works best when run in cell mode, since it generates lots of plots on the way.</p>
<p>This example is intended as a teaching aid, and I would be very interested in feedback that I can use to improve it.
<br />The example uses the shipping F14 demo model supplied by MathWorks, which I would like to acknowledge - the copyright for that belongs to them, not to me!</p>Daniel Augerhttp://www.mathworks.com/matlabcentral/profile/authors/3985910-daniel-augerMATLAB 8.5 (R2015a)Control System ToolboxRobust Control ToolboxSimulinkMATLABfalsetag:www.mathworks.com,2005:FileInfo/463922014-04-28T15:28:37Z2015-03-24T05:08:00ZPattern Recognition ToolboxFree pattern recognition toolbox for MATLAB<p>The Pattern Recognition Toolbox (PRT) for MATLAB (tm) is a framework of pattern recognition and machine learning tools that are powerful, expressive, and easy to use.
<br />Create a data set from your data (X ~ N x F) and labels (Y ~ N x 1):
<br />ds = prtDataSetClass(X,Y);</p>
<p>and run Z-score normalization + an SVM:</p>
<p>algo = prtPreProcZmuv + prtClassLibSvm;
<br />dsOut = algo.kfolds(ds);</p>
<p>And score the results:</p>
<p>prtScoreRoc(dsOut);</p>
<p>It's that easy. It's free. Have fun.</p>
<p>Installation instructions:
<br /><a href="http://newfolder.github.io/prtdoc/prtDocInstallation.html">http://newfolder.github.io/prtdoc/prtDocInstallation.html</a></p>
<p>Additional documentation & (rarely updated) blog available here:
<br /><a href="http://newfolder.github.io/">http://newfolder.github.io/</a>
</p>Peterhttp://www.mathworks.com/matlabcentral/profile/authors/1936940-peterMATLAB 8.0 (R2012b)MATLABfalsetag:www.mathworks.com,2005:FileInfo/501472015-03-21T23:50:51Z2015-03-21T23:51:41ZBeamforming by Phased Array AntennasAnimation code for beamforming by phased array antennas<p>In this code, the time domain wave propagation for two phased array antennas at different phase differences are shown. Thanks to the constructive and destructive interferences, the main beam of the wave is steered towards angle of interest. This code is used to generate the following animation:
<br />Beamforming by Phased Array Antennas
<br /><a href="http://youtu.be/2i293tUjYbI">http://youtu.be/2i293tUjYbI</a></p>Mehmethttp://www.mathworks.com/matlabcentral/profile/authors/2651313-mehmetMATLAB 8.2 (R2013b)false