tag:www.mathworks.com,2005:/matlabcentral/fileexchange/feedMATLAB Central File Exchangeicon.pnglogo.pngMATLAB Central - File Exchange - type:function product:"Curve Fitting Toolbox"User-contributed code library2014-12-19T06:18:28-05:00631100tag:www.mathworks.com,2005:FileInfo/41992003-11-26T11:58:03Z2014-12-01T01:40:52ZTDISTDistribution of a linear combination of independent symmetric random variables, e.g. Student's t<p>TDIST Computes the distribution (PDF, CDF or QF - quantiles) of a linear combination of independent SYMMETRIC (zero-mean) random variables (RVs), say Y = sum_i \lambda_i X_i, with X_i having specific distributions:
<br />- STUDENT's t distribution with 0 < df < Inf,
<br />- NORMAL distribution N(0,1),
<br />- RECTANGULAR (uniform) distribution R(-1,1),
<br />- symmetric TRIANGULAR distribution T(-1,1),
<br />- symmetric ARCSINE distribution (U-distribution) U(-1,1),
<br />- symmetric CHI2 (mixture of CHI2 and -CHI2) distribution.
<br />TDIST is based on numerical inversion of the characteristic function (Gil-Pelaez method). The required integration is performed by the 14-points Gaussian quadrature over N sub-intervals of [0, Tmax].
<br />
<br />SYNTAX:
<br />[yfun,xfun,results] = TDIST(X,df,lambda,funtype,options)
<br />INPUT:
<br />X - vector of appropriate (funtype) x values if X = [] then xfun is generated automatically
<br />df - vector of degrees of freedom of independent STUDENT's t RVs, t_df, for 0 < df < Inf. Further,
<br /> set df = Inf for the NORMAL RVs, N(0,1),
<br /> set df = -1 for the RECTANGULAR RVs, R(-1,1),
<br /> set df = -2 for the symmetric TRIANGULAR RVs, T(-1,1),
<br /> set df = -3 for the symmetric ARCSINE RVs, U(-1,1),
<br /> set df < -10 for the symmetric mixture of CHI2 and -CHI2 RVs with nu = abs(df+10) degrees of freedom.
<br />lambda - vector of coefficients of the linear combination
<br />funtype - default value is 1 (calculates the CDF)
<br /> The following funtypes are legible:
<br /> 0: TDIST calculates CDF and PDF, yfun = [CDF,PDF].
<br /> 1: TDIST calculates the cumulative distribution function, CDF at X, yfun = CDF.
<br /> 2: TDIST calculates the probability density function, PDF, at X, yfun = PDF.
<br /> 3: TDIST calculates the quantile function, QF at X, yfun = QF.
<br /> 4: TDIST calculates the characteristic function, CHF at X, yfun = CHF.
<br />EXAMPLE 1: (CDF of a linear combination of RVs defined by df)
<br />df = [Inf 1 -1 -2 -3];
<br />lambda = [1 1 5 1 10];
<br />funtype = 1;
<br />[cdf,x] = tdist([],df,lambda,funtype);
<br />EXAMPLE 2: (PDF of a linear combination of RVs defined by df)
<br />df = [Inf 1 -1 -2 -3];
<br />lambda = [1 1 5 1 10];
<br />funtype = 2;
<br />[pdf,x] = tdist([],df,lambda,funtype);</p>
<p>EXAMPLE 3: (QF of a linear combination of RVs defined by df)
<br />options.isPlot = false;
<br />df = [Inf 1 -1 -2 -3];
<br />lambda = [1 1 5 1 10];
<br />funtype = 3;
<br />prob = [0.9 0.95 0.99]';
<br />qf = tdist(prob,df,lambda,funtype,options);
<br />disp([prob qf]);</p>
<p>EXAMPLE 4: (CHF of a linear combination of RVs defined by df)
<br />options.isPlot = true;
<br />df = [Inf 1 -1 -2 -3];
<br />lambda = [1 1 5 1 10];
<br />funtype = 4;
<br />t = linspace(0,pi);
<br />chf = tdist(t,df,lambda,funtype,options);</p>
<p>EXAMPLE 5 (Create PDF as a CHEBFUN function and use it to compute CDF)
<br />df_true = [1 2 3 10];
<br />df = -10 - df_true; % symmetric chi2-mixture distributions
<br />lambda = [1 1 1 1];
<br />funtype = 2;
<br />N = 2^10;
<br />xmax = 130;
<br />x = -xmax * cos((0:N)*pi/N);
<br />f = tdist(x,df,lambda,funtype);
<br />pdf = chebfun(f,[-xmax,xmax]);
<br />integrate = sum(pdf);
<br />cdf = cumsum(pdf);
<br />xnew = linspace(-50,50);
<br />figure
<br />plot(xnew,cdf(xnew))</p>
<p>EXAMPLE 6: (Create a CHEBFUN for the QF)
<br />options.isChebfun = true;
<br />options.n = 2^8;
<br />options.N = 2^9;
<br />df = [Inf 1 -1 -2 -3];
<br />lambda = [1 1 5 1 10];
<br />funtype = 3;
<br />[qf,prob,results] = tdist([],df,lambda,funtype,options);
<br />QF = results.chebfun;
<br />disp(QF([0.9 0.95 0.99]'))</p>
<p>The algorithm requires evaluation of the BesselK and BesselJ functions.</p>
<p>The algorithm requires evaluation of the BesselK and BesselJ functions.
<br />
<br />REFERENCES:
<br />[1] GIL-PELAEZ, J. Note on the inversion theorem. Biometrika 38 (1951), 481–482.</p>
<p>[2] WITKOVSKY , V. On the exact computation of the density and of the quantiles of linear combinations of t and F random variables. Journal of Statistical Planning and Inference 94 (2001), 1–13.</p>
<p>[3] WITKOVSKY , V. Matlab algorithm TDIST: The distribution of a linear combination of Student’s t random variables. In COMPSTAT 2004 Symposium (2004), J. Antoch, Ed., Physica-Verlag/Springer 2004, Heidelberg, Germany,1995–2002.</p>
<p>[4] DRISCOLL, T. A., HALE, N., TREFETHEN, L. N. Chebfun Guide. Pafnuty Publications, Oxford, 2014.</p>
<p>Viktor Witkovsky (<a href="mailto:witkovsky@gmail.com">witkovsky@gmail.com</a>)
<br />Ver.: 01-Dec-2014 01:30:48</p>Viktor Witkovskyhttp://www.mathworks.com/matlabcentral/fileexchange/authors/1767MATLAB 8.3 (R2014a)Statistics ToolboxMATLABCurve Fitting Toolbox4675447023falsetag:www.mathworks.com,2005:FileInfo/483552014-11-21T16:29:13Z2014-11-21T16:29:13ZIntro to MATLAB demo files (MATLAB入門 デモファイル)files presented at MATLAB EXPO 2014 held in Tokyo - Intro to MATLAB<p>The zip file contains the code presented at session A1 (Introduction to MATLAB), MATLAB EXPO 2014 held Japan.
<br />BikeSharing\MainAnalysis.m:
<br />a main file to estimate the number of rental bikes, requires Statistics Toolbox and Curve Fitting Toolbox (the last fitting part)
<br />webread_findStations.m:
<br />a file which reads data from RESTful Web Services - JSON (introducing the new R2014b MATLAB feature), requires Internet connection and Mapping Toolbox for drawing webmap part. </p>
<p>このファイルは、東京で開催された MATLAB EXPO 2014 のA1セッション、「基礎からはじめるMATLABプログラミング入門」のでもファイルです。主なファイルは以下の二つです。</p>
<p>BikeShring\MainAnalysis.m:
<br />レンタルバイクを予測するコード、Statistics Toolbox と Curve Fitting Toolbox （最後のフィッティングのセクション）が必要です。</p>
<p>webread_findStations.m:
<br />RESTful Web サービス から JSON 形式のデータを読み込むコード（R2014b の MATLAB 新機能の紹介）、インターネット接続が必要です。最後の地図描画のセクションのみ Mapping Toolbox が必要です。</p>mizuhttp://www.mathworks.com/matlabcentral/fileexchange/authors/334508MATLAB 8.4 (R2014b)Curve Fitting ToolboxFinancial ToolboxMapping ToolboxSimulink Verification and ValidationStatistics ToolboxMATLABfalsetag:www.mathworks.com,2005:FileInfo/199502008-05-16T09:09:46Z2014-10-06T16:38:22ZROCout=roc(varargin)
compute a ROC curve<p>ROC - Receiver Operating Characteristics.
<br />The ROC graphs are a useful technique for organizing classifiers and visualizing their performance. ROC graphs are commonly used in medical decision making.
<br />YOU CAN USE THIS FUNCTION ONLY AND ONLY IF YOU HAVE A BINARY CLASSIFICATOR.</p>
<p>The input is a Nx2 matrix: in the first column you will put your test values (i.e. glucose blood level); in the second column you will put only 1 or 0 (i.e. 1 if the subject is diabetic; 0 if he/she is healthy).</p>
<p>By itself (without arguments) roc will run a demo.</p>
<p>The function computes and plots the classical ROC curve and curves for Sensitivity, Specificity and Efficiency (see the screenshot).</p>
<p>The function will show 4 cut-off points:
<br />1) Max sensitivity
<br />2) Max specificity
<br />3) Cost effective (cross point of sensitivity and specificity curves)
<br />4) Max Efficiency</p>
<p>ROC requires the Curve fitting toolbox.
</p>Giuseppe Cardillohttp://www.mathworks.com/matlabcentral/fileexchange/authors/22520MATLAB 7.6 (R2008a)Curve Fitting Toolboxfalsetag:www.mathworks.com,2005:FileInfo/479042014-09-22T17:38:34Z2014-09-23T06:00:35Z3DSpectraA 3-dimensional quantification algorithm for LC–MS labeled profile data<p>This is the Matlab code related to the research project published in the paper "3DSpectra: A 3-dimensional quantification algorithm for LC–MS labeled profile data": <a href="http://www.sciencedirect.com/science/article/pii/S1874391914004163">http://www.sciencedirect.com/science/article/pii/S1874391914004163</a>
<br />Summary
<br />Mass spectrometry-based proteomics can generate highly informative datasets, as profile three-dimensional (3D) LC–MS data: LC–MS separates peptides in two dimensions (time, m/z) minimizing their overlap, and profile acquisition enhances quantification. To exploit both data features, we developed 3DSpectra, a 3D approach embedding a statistical method for peptide border recognition.</p>
<p>3DSpectra efficiently accesses profile data by means of mzRTree, and makes use of a priori metadata, provided by search engines, to quantify the identified peptides. An isotopic distribution model, shaped by a bivariate Gaussian Mixture Model (GMM), which includes a noise component, is fitted to the peptide peaks using the expectation–maximization (EM) approach. The EM starting parameters, i.e., the centers and shapes of the Gaussians, are retrieved from the metadata. The borders of the peaks are delimited by the GMM iso-density curves, and noisy or outlying data are discarded from subsequent analysis.</p>
<p>The 3DSpectra program was compared to ASAPRatio for a controlled mixture of Isotope-Coded Protein Labels (ICPL) labeled proteins, which were mixed at predefined ratios and acquired in enhanced profile mode, in triplicate. The 3DSpectra software showed significantly higher linearity, quantification accuracy, and precision than did ASAPRatio in this real use case simulation where the true ratios are known, and it also achieved wider peptide coverage and dynamic range.</p>Sara Nassohttp://www.mathworks.com/matlabcentral/fileexchange/authors/449187MATLAB 7.12 (R2011a)Bioinformatics ToolboxCurve Fitting ToolboxImage Processing ToolboxMATLABfalsetag:www.mathworks.com,2005:FileInfo/478052014-09-10T19:48:46Z2014-09-13T06:01:14ZMITTMulti-Instrument Turbulence Toolbox<p>published in Computers and Geosciences (authors B. MacVicar, S. Dilling, and J. Lacey)
<br />The Multi-Instrument Turbulence Toolbox (MITT) was created to standardize the organization and cleaning/quality classification of velocity time series measured at 20-200 Hz by a set of commonly used instruments such as the Acoustic Doppler Velocimeter (ADV) and the Ultrasonic Doppler Velocity Profiler (UDVP). </p>Bruce MacVicarhttp://www.mathworks.com/matlabcentral/fileexchange/authors/460287MATLAB 8.0 (R2012b)Curve Fitting ToolboxSignal Processing ToolboxStatistics ToolboxMATLABfalsetag:www.mathworks.com,2005:FileInfo/473272014-07-23T20:47:47Z2014-07-23T21:45:37ZFRAP.zipMatlab GUI for analysis of FRAP data<p>This is a simple GUI for loading and analyzing data using Fluorescence Recovery After Photobleaching (FRAP) technique.
<br />The GUI will calculate recovery fraction(s) and half-time(s). It supports the following features:</p>
<p>1. Single or multi-component recovery curve fit</p>
<p>2. Background photobleaching correction</p>
<p>3. Export results to Excel. </p>Jessehttp://www.mathworks.com/matlabcentral/fileexchange/authors/488083MATLAB 8.3 (R2014a)Curve Fitting ToolboxImage Processing ToolboxMATLABfalsetag:www.mathworks.com,2005:FileInfo/469692014-06-15T20:53:17Z2014-07-22T19:55:35Zcode.zipdemo version of my code for the paper: “Arousal Content Representation of Sports Videos Using Dynami<p>This is a demo version of my code for the paper: “ Arousal Content Representation of Sports Videos
<br />Using Dynamic Prediction Hidden Markov Models” just run “demo.m” . The code shows the predicted curve for every iteration of the EM algorithm and compares it to linear regression for a 2 state example. The function required are all included
<br />I made some changes with respect to regularization so it runs smoothly for this data but it may not always converge to a local maximum so you may have to run it multiple times.
<br />generates toy data as well.
</p>Joseph Santarcangelohttp://www.mathworks.com/matlabcentral/fileexchange/authors/477227MATLAB 8.0 (R2012b)Curve Fitting Toolboxfalsetag:www.mathworks.com,2005:FileInfo/406922013-03-08T16:52:27Z2014-07-08T06:00:27ZMean square displacement analysis of particles trajectoriesA MATLAB class for the mean square displacement analysis of particle trajectories, with a tutorial.<p>Mean square displacement (MSD) analysis is a technique commonly used in colloidal studies and biophysics to determine what is the mode of displacement of particles followed over time. In particular, it can help determine whether the particle is:
<br />- freely diffusing;
<br />- transported;
<br />- bound and limited in its movement.
<br />On top of this, it can also derive an estimate of the parameters of the movement, such as the diffusion coefficient.</p>
<p>@msdanalyzer is a MATLAB per-value class that helps performing this kind of analysis. The user provides several trajectories he measured, and the class can derive meaningful quantities for the determination of the movement modality.</p>
<p>@msdanalyzer can deal with tracks (particle trajectories) that do not start all at the same time, have different lengths, have missing detections (gaps: a particle fails to be detected in one or several frame then reappear), and do not have the same time sampling. As soon as you added your tracks to the class, everything is transparent. It offers facilities to plot and inspect the data, whether for individual particles, or on ensemble average quantities. It has several methods for correcting for drift, which is the main source of error in the analysis. Once corrected, the data can analyzed via the MSD curves or via the velocity autocorrelation. Automated fits of the MSD curves are included (but they require you have the curve fitting toolbox), allowing to derive the type of motion and its characteristics.</p>
<p>Included is a rather long tutorial with references, that will introduce you to the problem using numerical simulations, make you reproduce published results, and detail how the class work. Some basis of physics are required. </p>
<p><a href="http://tinevez.github.io/msdanalyzer/">http://tinevez.github.io/msdanalyzer/</a></p>
<p>If you use this tool for your work, we kindly ask you to cite the following article for which it was created:</p>
<p>Nadine Tarantino, Jean-Yves Tinevez, Elizabeth Faris Crowell, Bertrand Boisson, Ricardo Henriques, Musa Mhlanga, Fabrice Agou, Alain Israël, and Emmanuel Laplantine. TNF and IL-1 exhibit distinct ubiquitin requirements for inducing NEMO-IKK supramolecular structures. J Cell Biol (2014) vol. 204 (2) pp. 231-45</p>
<p><a href="http://jcb.rupress.org/content/204/2/231">http://jcb.rupress.org/content/204/2/231</a></p>Jean-Yves Tinevezhttp://www.mathworks.com/matlabcentral/fileexchange/authors/29713MATLAB 8.0 (R2012b)Curve Fitting Toolbox26311falsetag:www.mathworks.com,2005:FileInfo/373392012-06-28T15:53:48Z2014-05-09T19:32:03ZMLIB - toolbox for analyzing spike dataSet of functions for the basic analysis of spike data from neurophysiological experiments<p>MLIB is a software package for the analysis of the spike data, ie patterns of extracellularly recorded action potentials. In particular, MLIB contains functions for a) assessing spike sorting quality / unit isolation, and b) constructing all sorts of peri-stimulus time histograms as well as raster displays and spike density functions constructed with various filter kernels.</p>Maik Stüttgenhttp://www.mathworks.com/matlabcentral/fileexchange/authors/262160MATLAB 7.8 (R2009a)Curve Fitting ToolboxStatistics ToolboxMATLABfalsetag:www.mathworks.com,2005:FileInfo/441132013-10-29T15:17:04Z2014-01-08T22:33:47ZGARCH,EGARCH,NAGARCH,GJR models and implicit VIXEstimate GARCH/EGARCH/NAGARCH/GJR parameters from a time series of prices , rates and VIX value.<p>The functions in this file can be used for estimate historical pararameters of GARCH/EGARCH/GJR/NAGARCH models using time series of prices, rates and CBOE VIX. There are three types of loglikehood functions that are maximize. The first one uses returns only. The second one uses VIX levels only and the last one uses both.</p>
<p>In an article of Zhang and Hao [2013:<a href="http://jfec.oxfordjournals.org/content/early/2013/01/20/jjfinec.nbs026.short?rss=1">http://jfec.oxfordjournals.org/content/early/2013/01/20/jjfinec.nbs026.short?rss=1</a>] are described some formulas to calculate implicit VIX. The Functions in the zip file can be used to calculate implicit VIX for GARCH/EGARCH/GJR/NAGARCH models using such formulas. It is also possibible make a graph in which there are market VIX and implicit VIX.</p>
<p>Another exercise that can be done is simulate and plot a VIX futures term structure using impliciti VIX and market VIX. </p>
<p>The Last exercise is a calibration of parameters. Starting from a date, the function can estimate parameters in-sample of GARCH/EGARCH/GJR/NAGARCH models minimize the difference bewteen implicit VIX and market VIX. Then VIX futures term structures can be simulated and compared with out-of-sample real market VIX futures structures.</p>
<p>In garchmodel there is an example.</p>
<p>These codes are in Object-Orientend Programming language. There are two macroclass :'Models' and Futures'. There are four classes, one for each model.
<br />Inside Zip file, there is a diagram with properties and methods of the classes.</p>Luis Espejohttp://www.mathworks.com/matlabcentral/fileexchange/authors/396961MATLAB 8.1 (R2013a)Curve Fitting ToolboxOptimization ToolboxSimulink Control DesignStatistics ToolboxMATLABfalse