tag:www.mathworks.com,2005:/matlabcentral/fileexchange/feedMATLAB Central File Exchangeicon.pnglogo.pngMATLAB Central - File ExchangeUser-contributed code library2015-09-03T11:12:48-04:00248061100tag:www.mathworks.com,2005:FileInfo/528272015-09-03T14:46:52Z2015-09-03T14:48:08ZdeleteOutliers2For input data returns data without outliers with respect to function specification.<p>[XOUT, YOUT, IDX, OUTLIERS] = DELETEOUTLIERS2(X, Y, F, C0, ALPHA, REP)
<br />For input vectors x and y, returns vectors xOut, yOut with outliers
<br />(at the significance level alpha) removed. The elements in vector x
<br />specify data arguments and the elements in vector y the corresponding
<br />data values. F is a function which is fit to the data y=F(x) in a least
<br />square sense, where c0 is the initial function constants state for
<br />fitting. Also, optional output argument idx returns the indices in
<br />x and y of outlier values. Optional output argument outliers returns
<br />the outlying values in y.
<br />X is the input parameter. Default: 1:n where n = length(Y)
<br />Y is the input data.</p>
<p>F is the function approximating the data distribution.
<br />Default: Constant function.</p>
<p>C0 is the initial state of constants in function F.</p>
<p>ALPHA is the significance level for determination of outliers.
<br />Default: Alpha = 0.05.</p>
<p>REP is an optional argument that forces the replacement of removed
<br />elements with NaNs to presereve the length of X and Y.</p>
<p>This is an iterative implementation of the Grubbs Test that tests one
<br />value at a time. In any given iteration, the tested value is either the
<br />highest value, or the lowest, and is the value that is furthest
<br />from the function approximation. Infinite elements are discarded if rep
<br />is 0, or replaced with NaNs if rep is 1.</p>
<p>Appropriate application of the test requires that data can be reasonably
<br />approximated by a normal distribution around the approximation function.
<br />For reference, see:
<br />1) "Procedures for Detecting Outlying Observations in Samples," by F.E.
<br /> Grubbs; Technometrics, 11-1:1--21; Feb., 1969, and
<br />2) _Outliers in Statistical Data_, by V. Barnett and
<br /> T. Lewis; Wiley Series in Probability and Mathematical Statistics;
<br /> John Wiley & Sons; Chichester, 1994.
<br />A good online discussion of the test is also given in NIST's Engineering
<br />Statistics Handbook:
<br /><a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda35h.htm">http://www.itl.nist.gov/div898/handbook/eda/section3/eda35h.htm</a></p>
<p>############ EXAMPLE - For full code see'testDeleteOutliers.m ###########
<br />% define data points close to an exponential curve
<br />x = 0:0.1:2;
<br />y = 2*exp(-2*x) + randn(1,21)*0.1;</p>
<p>% exponential function definition
<br />F = @(c,xdata)c(1)*exp(-c(2)*xdata);
<br />c0 = [1 0]; % initial point</p>
<p>% delete outliers
<br />[xOut,yOut,~,~] = deleteOutliers2(x, y, F, c0, 0.3, 0);</p>
<p>############################ END OF EXAMPLE #############################</p>
<p>Toolboxes required: Optimization Toolbox (function: lsqcurvefit)
<br />Other m-files required: none
<br />Subfunctions: zcritical
<br />MAT-files required: none</p>
<p>See also: deleteoutliers, lsqcurvefit</p>Christopherhttp://www.mathworks.com/matlabcentral/profile/authors/3702730-christopherMATLAB 8.5 (R2015a)Optimization Toolbox3961falsetag:www.mathworks.com,2005:FileInfo/519842015-07-06T08:30:14Z2015-09-03T11:29:14Zcvxread - Read Calibration-Value Exchange (CVX) FileThis function reads the calibration data ('labels') in a CVX file and imports them into MATLAB.<p>The user can specify the format in which the labels are imported into MATLAB. Additionally, an interactive GUI mode is available. The import may be redirected to either a return argument of the function, to the base workspace, or to a .mat file. For details, refer to the included PDF documentation.
<br />NOTE: This function comes without warranty that it is able to properly parse and import all CVX files (i.e. from any source and with any content). It is based on the official format description but not all cases could have been tested. Please report any errors, bugs and shortcomings to the author!
<br />MATLAB versions: Developed under 2013b, tested also for 2014b.</p>Jonas Asprionhttp://www.mathworks.com/matlabcentral/profile/authors/5615980-jonas-asprionMATLAB 8.2 (R2013b)MATLABfalsetag:www.mathworks.com,2005:FileInfo/528252015-09-03T10:18:47Z2015-09-03T10:18:47ZDC-DC Converter Mathematical ModelThe DC-DC Converter support Buck, Boost, Buck-Boost Converter selection and closed loop design.<p>The DC-DC Converter block represents a behavioral model of a DC to DC power converter using first principle mathematical model. The DC-DC Converter support Buck, Boost, Buck-Boost Converter selection and closed loop design.</p>Rodney Tanhttp://www.mathworks.com/matlabcentral/profile/authors/6664770-rodney-tanMATLAB 8.5 (R2015a)Simulinkfalsetag:www.mathworks.com,2005:FileInfo/528242015-09-03T09:23:20Z2015-09-03T09:23:20Za4plainfigure(varargin)This figure creates an empty, white figure of A4-size with border. Suitable for making plots to pdf.<p>Figure template with basic hacks to make the figure looks nice on print or pdf or other outputs.</p>Andreas Berghttp://www.mathworks.com/matlabcentral/profile/authors/6176336-andreas-bergMATLAB 8.5 (R2015a)MATLABNonefalsetag:www.mathworks.com,2005:FileInfo/528232015-09-03T09:05:47Z2015-09-03T09:05:47ZHistogram AnalyserLoad Image--Shows Histogram--Histogram Equalization--Final Image<p>Some histogram Analysis functions.</p>Bhartenduhttp://www.mathworks.com/matlabcentral/profile/authors/6867017-bhartenduMATLAB 8.3 (R2014a)Image Processing ToolboxMATLABfalsetag:www.mathworks.com,2005:FileInfo/458682014-03-13T08:04:15Z2015-09-03T08:33:34ZLocal Community Detection via a Flow Propagation (FlowPro) methodFlowPro finds the community of a node in a complex network without the knowledge of the entire graph<p>We propose a flow propagation algorithm (FlowPro) that finds the community of a node in a complex network without the knowledge of the entire graph. The novelty of the proposed approach is the fact that FlowPro is local and it does not require the knowledge of the entire graph as most of the existing methods from literature. This makes possible the application of FlowPro in extremely large graphs or in cases where the entire graph is unknown like in most social networks.
<br />This code is a simple (not speed optimized) and Non Distributed implementation of FlowPro
<br /> based on the papers [1] and [2]. You can find more details in <a href="http://www.csd.uoc.gr/~cpanag">www.csd.uoc.gr/~cpanag</a>
<br />Files:
<br /> getCommunityFlowPro.m: implemetation of the method
<br /> getHighestDiff2.m: function that gives the community accrding to the stored flow
<br /> getCommunityFlowProSize.m:implemetation of the method when the size of community is given
<br /> data.mat: Synthetic Data (D) with N = 1000, Comm = 10, degree = 20, local/degree = 0.65
<br /> with ground truth (COMM) (see paper [1] for the parameters).
<br /> usage to run FlowPro for INIT = 1 :
<br />
<br /> load data;
<br /> [Cluster,per,S,maxITE,totalSMS] = getCommunityFlowPro(D,COMM,1); </p>
<p>usage to run FlowPro using for INIT = 1 and size of community = 100:
<br />
<br /> load data;
<br /> [ClusterSize,perSize] = getCommunityFlowProSize(D,COMM,100,1); </p>
<p>We will appreciate if you cite our paper [1] in your work: </p>
<p>[1] C. Panagiotakis, H. Papadakis and P. Fragopoulou, FlowPro: A Flow Propagation Method for Single Community Detection, IEEE Consumer Communications and Networking Conference, 2014.</p>
<p>[2] C. Panagiotakis, H. Papadakis and P. Fragopoulou, CoViFlowPro: A Community Visualization method based on a Flow Propagation Algorithm, International Conference on Bio-inspired Information and Communications Technologies (formerly BIONETICS) - BICT 2014, 2014.</p>
<p>[3] C. Panagiotakis, H. Papadakis, and P. Fragopoulou, Local Community Detection via Flow Propagation, International conference on Advances in Social Network Analysis and Mining (ASONAM), 2015.</p>Costas Panagiotakishttp://www.mathworks.com/matlabcentral/profile/authors/615630-costas-panagiotakisMATLAB 7.14 (R2012a)falsetag:www.mathworks.com,2005:FileInfo/510812015-06-02T23:57:33Z2015-09-03T06:47:38ZStandardized Drought Analysis Toolbox (SDAT)SDAT offers a generalized framework for deriving nonparametric standardized drought indices.<p>The Standardized Drought Analysis Toolbox (SDAT) offers a generalized framework for deriving nonparametric standardized drought indices. Current indicators suffer from deficiencies including temporal inconsistency, and statistical incomparability. Different indicators have varying scales and ranges and their values cannot be compared with each other directly. Most drought indicators rely on a representative parametric probability distribution function that fits the data. However, a parametric distribution function may not fit the data, especially in continental/global scale studies. SDAT is based on a nonparametric framework that can be applied to different climatic variables including precipitation, soil moisture and relative humidity, without having to assume representative parametric distributions. The most attractive feature of the framework is that it leads to statistically consistent drought indicators based on different variables.
<br />SDAT can be used to generate nonparametric standardized drought indicators such as:
<br />- Standardized Precipitation Index (SPI),
<br />- Standardized Soil Moisture Index (SSI),
<br />- Standardized Runoff Index (SRI)
<br />- Standardized Streamflow Index (SSFI),
<br />- Standardized Relative Humidity Index (SRHI),
<br />- Standardised Groundwater level Index (SGI),
<br />- Standardized Surface Water Supply Index (SSWSI),
<br />- Standardized Water Storage Index (SWSI).
<br />For more information, a user guide and sample input data visit:
<br /><a href="http://amir.eng.uci.edu/sdat.php">http://amir.eng.uci.edu/sdat.php</a>
<br />References:
<br />Hao Z., AghaKouchak A., Nakhjiri N., Farahmand A., 2014, Global Integrated Drought Monitoring and Prediction System, Scientific Data, 1:140001, 1-10, doi: 10.1038/sdata.2014.1.</p>
<p>Farahmand A., AghaKouchak A., 2015, A Generalized Framework for Deriving Nonparametric Standardized Drought Indicators, Advances in Water Resources, 76, 140-145, doi: 10.1016/j.advwatres.2014.11.012.</p>HRLhttp://www.mathworks.com/matlabcentral/profile/authors/2424579-hrlMATLAB 7.13 (R2011b)falsetag:www.mathworks.com,2005:FileInfo/528102015-09-02T13:43:21Z2015-09-03T05:44:27ZnanContourf(xb,yb,x,y,z)contourf with nans filled in precisely<p>The function makes a contourf plot with nans filled in gray with borders. For example, if you have a map of ocean sea surface temperature, and have nans on land 'boxes', this will plot the coast nicely (see image).
<br />Takes the same input as contourf(x,y,z), plus (xb,yb) which are the boundary coordinates of (x,y), i.e. (xb,yb) define the coordinates of the borders of the boxes.</p>
<p>This now works even if there are 'lakes' within the continents.</p>
<p>Basically it fills the nans by extrapolating using the very good inpaint_nans.m, then it plots the contourf using this filled file, then it superimposes the filling of nans, then it draws the coast line.</p>
<p>Only issue I have now is that when printing to eps, you can slightly see the underlying contourf between nan boxes... If anyone knows how to deal with it, let me know!</p>benoithttp://www.mathworks.com/matlabcentral/profile/authors/4857040-benoitMATLAB 7.14 (R2012a)inpaint_nans4551falsetag:www.mathworks.com,2005:FileInfo/528222015-09-03T05:27:50Z2015-09-03T05:35:49ZMake the y-axis limits uniform across subplotsReset the y-axis of subplots in a figure using pre-determined limits or by computing new limits.<p>This function resets the input figure so that all subplots have the same y-axis limits. If new axis limits are given, the function uses them; otherwise, it determines the new limits based on the current subplots. This function can be used for a single plot as well, but is primarily designed to homogenize the output of subplots. It also works well when you want to plot boxplots from different datasets side-by-side but don't want to map a category variable to them.</p>Greg Basshttp://www.mathworks.com/matlabcentral/profile/authors/6179536-greg-bassMATLAB 8.5 (R2015a)falsetag:www.mathworks.com,2005:FileInfo/463922014-04-28T15:28:37Z2015-09-03T05:02:43ZPattern 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)MATLABfalse