tag:www.mathworks.com,2005:/matlabcentral/fileexchange/feedMATLAB Central File Exchangeicon.pnglogo.pngMATLAB Central - File ExchangeUser-contributed code library2014-11-24T11:50:10-05:00224201100tag:www.mathworks.com,2005:FileInfo/484442014-11-24T16:18:24Z2014-11-24T16:18:24ZBinomial Inverse (Binary Search)Binomial inverse cumulative distribution function via binary search<p>X = binoinv_bs(Y,N,P) returns the inverse of the binomial cdf with parameters N and P. Since the binomial distribution is discrete, BINOINV_BS returns the least integer X such that the binomial cdf evaluated at X, equals or exceeds Y. BINOINV_BS utilizes a binary search of BINOCDF to find the inverse of the binomial distribution, which may be faster than BINOINV for large N.
<br />
<br />The size of X is the common size of the input arguments. A scalar input functions as a constant matrix of the same size as the other inputs.
<br />
<br />Note that X takes the values 0,1,2,...,N.
<br />
<br />See also binoinv, binocdf, binofit, binopdf, binornd, binostat, icdf.</p>Nade Sritanyaratanahttp://www.mathworks.com/matlabcentral/fileexchange/authors/491655MATLAB 8.3 (R2014a)falsetag:www.mathworks.com,2005:FileInfo/464192014-04-30T15:56:31Z2014-11-24T16:17:02ZrotationMatrix.zip3D rotation matrix class<p>The class RotationMatrix allows to handle a 3D rotation matrix with different parametrizations:
<br />- a [3x3] rotation matrix
<br />- Euler angles
<br />- exponential map
<br />- quaternions
<br />Once a RotationMatrix instance has been created from one of the parametrizations above, all the parametrizations can be obtained interchangeably. </p>
<p>Example:</p>
<p>% create a rotation matrix from its exponential map
<br />r = RotationMatrix(rand([3,1]), 'exponentialMap');</p>
<p>% get the corresponding matrix/quaternion representation
<br />aMatrix = r.GetRotationMatrix();
<br />aQuaternion = r.GetQuaternion();</p>
<p>Additional static methods are provided for building a rotation matrix from different parametrizations.</p>
<p>See RotationMatrixTest.m for further examples.</p>Alberto Crivellarohttp://www.mathworks.com/matlabcentral/fileexchange/authors/461125MATLAB 8.2 (R2013b)MATLABfalsetag:www.mathworks.com,2005:FileInfo/485522014-11-24T15:35:13Z2014-11-24T15:45:56ZTupper's self-referential formulasolve the special N in Tuppers' formula, if the image provided.<p>wiki:Tupper's self-referential formula.
<br /><a href="http://en.wikipedia.org/wiki/Tupper%27s_self-referential_formula">http://en.wikipedia.org/wiki/Tupper%27s_self-referential_formula</a>
<br />Note:Wiki may provide a wrong answer.
<br />inspired by the following website:
<br /><a href="http://www.matrix67.com/blog/archives/301">http://www.matrix67.com/blog/archives/301</a>
<br /><a href="http://www.matrix67.com/blog/archives/4447">http://www.matrix67.com/blog/archives/4447</a>
<br /><a href="http://bbs.pediy.com/showthread.php?t=56002">http://bbs.pediy.com/showthread.php?t=56002</a></p>Mineralterhttp://www.mathworks.com/matlabcentral/fileexchange/authors/285004MATLAB 8.2 (R2013b)falsetag:www.mathworks.com,2005:FileInfo/466082014-05-14T14:02:52Z2014-11-24T13:04:12ZfrcolocColocalization of Fluorescence and Raman Microscopic Images for Training Data Collection<p>This colocalization scheme unveils statistically significant overlapping regions by identifying correlation between fluorescence color channels and clusters from unsupervised machine learning methods like hierarchical cluster analysis (HCA) performed on Raman or CARS spectral images. The scheme works as a pre-selection to gather appropriate spectra which can be used as training data to establish a supervised classifier (e.g. Random Forest) to automatically identify subcellular compartments.
<br />A dataset for testing can be downloaded here: <a href="http://www2.rz.rub.de:8234/imperia/md/content/pure/supplement.zip">http://www2.rz.rub.de:8234/imperia/md/content/pure/supplement.zip</a></p>Sascha D. Kraußhttp://www.mathworks.com/matlabcentral/fileexchange/authors/255204MATLAB 8.3 (R2014a)falsetag:www.mathworks.com,2005:FileInfo/485512014-11-24T11:22:35Z2014-11-24T11:22:35ZThe X CollectionCollection of programs that ease interaction with Excel files.<p>The X collection is a set of Matlab programs that make it easier for the user to interact with Excel sheets. Matlab offers already many ways of exchanging data with Excel. For instance xlsread and xlswrite allow the programmer to read data from and write data into Excel worksheets. But these programs are inefficient when a large number of read and write operations have to be repeated because they build a cobnbection to the Excel COM server and then release this connection again with every operation.
<br />The X collection splits that up. The programmer creates a connection to Excel (with XConnect), then does whatever he or she has to do (XWrite, XRead, XOpenBook, XGetSheet, XSaveBook etc), and then releases the Excel connection again (XDisconnect). Depending on the type of work, the gain in speed range from none to huge.
<br />The following programs are included: XConnect, XDisconnect, XListOpenBooks, XGetBook, XNewBook, XOpenBook, XSaveBook, XSaveAllBooks, XCloseBook, XCloseAllBooks, XListSheets, XGetSheet, XAddSheet, XRead, XWrite, XWriteDates, XDateFmt, XRangeAddress</p>
<p>Their meanings should be more or less obvious. They all come with help, so that you user should be abvle to figure out how to use these programs fairly easily.
<br />There is also an example script (example.m) that demonstrates many of these programs.
<br />Should you need help with this, please contact me. If you find this contribution useful, please comment below.</p>Yvan Lengwilerhttp://www.mathworks.com/matlabcentral/fileexchange/authors/28060MATLAB 8.4 (R2014b)Microsoft Excel installationfalsetag:www.mathworks.com,2005:FileInfo/457402014-03-03T15:49:52Z2014-11-24T09:39:08ZMultidimensional distributions visualisation and analysis.Matrix of planar projections of multidimensional distributions with tools for interactive analysis.<p>Simultaneously visualises multiple multidimensional distributions as a matrix of planar projections and provides means for further interactive analysis of them. Supports large data set (tested with 2 million 4D data points). plot_feature_matrix is an essential tool for statistical modelling and classification algorithms development.
<br />Given N-dimensional data points, plot_feature_matrix constructs NxN matrix of axes, and plots the projections of the data points onto the planes corresponding to the respective coordinates. The diagonal axes show histograms of the data points. Additional vector of class IDs for each of the data points can be provided, in which case each class is shown with a separate color and each diagonal axis includes histogram for each of the classes.
<br />Mouse click inside a non-diagonal axis shows information about the points in the vicinity of the click. By default, the amount of points from each of the class is shown. However, if a custom visualisation function is provided, then more detailed analysis of the data points in the vicinity of the click is possible.</p>
<p>For example, let's assume that you are conducting a study, which aim is to estimate the probability of myocardial infarction based on four metrics:
<br /> - duration of atrial fibrillation during 24 hour ambulatory ECG recording (stored in vector 'holter').
<br /> - peak ischemic ST depression during cardiac stress test (stored in vector 'ST').
<br /> - mean arterial pressure from 24 hour ambulatory blood pressure recording (stored in vector 'MAP').
<br /> - duration of the depolarization wave of the ventricles measured in resting ECG recording (stored in vector QRS).
<br />Also, boolean vector 'MI' has value 'true' for those patients which experience myocardial infarction during 5 years since the above tests. Use the following commands to initialize the variables:
<br /> >> N = 1e4;
<br /> >> t1 = randn(1,N); t2 = randn(1,N);
<br /> >> holter = [t1 2+t2];
<br /> >> ST = [t1+t2 2+t1*2-t2];
<br /> >> MAP = [t1.^2+t2 -t1-t2.^2];
<br /> >> QRS = [t1./(1+t2.^2) 1+(t1.^2+t2.^2)./(1+(t1-t2).^2+t2.^2)];
<br /> >> MI = [false(1,N), true(1,N)];</p>
<p> >> Z = [holter; ST; MAP; QRS];
<br /> >> csFeatures = {'holter','ST','MAP', 'QRS'};
<br /> >> vClass = 1+MI;
<br /> >> csClasses = {'Healthy', 'MI'};</p>
<p>Show the feature matrix with default investigation tool (just reports number of cases in the vicinity):
<br /> >> plot_feature_matrix(Z, vClass, csFeatures, csClasses)</p>
<p>Only the first parameter is mandatory, every other one can be omitted or replaced with the empty matrix:
<br /> >> plot_feature_matrix(Z)</p>
<p>Use custom visualisation function to show all selected cases in one plot:
<br /> >> t1_ = [t1 t1]; t2_ = [t2 t2];
<br /> >> plot_feature_matrix(Z, vClass, csFeatures, csClasses, @(~,~,isSel) scatter(t1_(isSel),t2_(isSel)) )</p>
<p>Use custom visualisation function which can show only one case at a time (press <space> to see next uniformly sampled example):
<br /> >> show_1_func = @(isSel,ii) cylinder(abs(Z(:,find(cumsum(isSel)==ii,1))));
<br /> >> show_set_func = @(~,~,isSel) show_uniformly_sampled(sum(isSel), @(ii) show_1_func(isSel,ii));
<br /> >> plot_feature_matrix(Z, vClass, csFeatures, csClasses, show_set_func)</p>
<p>Use the output parameter to get axis handles of the matrix (can be used to overlay additional plots):
<br /> >> hAxis = plot_feature_matrix(...);</p>
<p>For additional explanations type: help plot_feature_matrix</p>
<p>This submission is courtesy of Norav Medical (<a href="http://www.norav.com">www.norav.com</a>) - the leading company in the fields of PC-ECG, EKG Management systems and related non-invasive cardiac devices. </p>Mark Matusevichhttp://www.mathworks.com/matlabcentral/fileexchange/authors/240213MATLAB 7.9 (R2009b)MATLABRobust Control ToolboxIt is recommended to install smoothhist2D by Peter Perkins (www.mathworks.com/matlabcentral/fileexchange/13352). This file is not required, but if present, then it is used when appropriate to produce nicer data visualisation.falsetag:www.mathworks.com,2005:FileInfo/455802014-02-17T08:10:49Z2014-11-24T09:33:07Zplot_1feature_2classVisualises usefulness of a feature for binary classification.<p>When you attempt to classify data in 2 classes based on a single feature, the first thing to do is to review the conditional probability of the point being from the first class given the value of the feature. However, as usual, overfit is creeping in the shadows. Therefore, the amount of data that the conditional probability is based on should be reviewed as well. This function plots on the same graph the conditional probability and histogram of data distribution for each class separately.
<br />For example, let's assume that you are attempting to predict whether the patient will show paroxysmal atrial fibrillation during 24 hour ambulatory ECG recording (stored in boolean vector 'holter') based on value of peak ischemic ST depression during cardiac stress test (stored in vector 'ST').
<br />Use the following commands to initialize the variables:
<br /> >> N = 1e3;
<br /> >> k = 20;
<br /> >> ST = [5+randn(1,N) 2*rand(1,k) 8+2*rand(1,k)];
<br /> >> holter = [2+6*rand(1,N)<ST(1:N) true(1,k-1) false(1,k) true];</p>
<p>Now you can visualise the data using the following commands:
<br /> >> plot_1feature_2class(ST, holter, 'ST, mm', {'PAF', 'no PAF'})</p>
<p>For additional explanations type: help plot_1feature_2class</p>
<p>This submission is courtesy of Norav Medical (<a href="http://www.norav.com">www.norav.com</a>) - the leading company in the fields of PC-ECG, EKG Management systems and related non-invasive cardiac devices. </p>Mark Matusevichhttp://www.mathworks.com/matlabcentral/fileexchange/authors/240213MATLAB 7.9 (R2009b)MATLABfalsetag:www.mathworks.com,2005:FileInfo/454812014-02-10T20:58:04Z2014-11-24T09:22:46Zdependents_plotVisualises dependents of one variable on another.<p>Visualises dependents of one variable on another.
<br />Plots conditional statistics. The statistics plotted by default is the conditional mean. However, any other statistics also can be plotted.</p>
<p>For example, let's assume that you have two metrics:
<br /> - duration of atrial fibrillation during 24 hour ambulatory ECG recording (stored in vector 'holter').
<br /> - peak ischemic ST depression during cardiac stress test (stored in vector 'ST').
<br />and you need to analyse the conditional probability distribution of the former on the later.
<br />Use the following commands to initialize the variables:
<br /> >> N = 1e5;
<br /> >> ST = 2*pi*(1:N)/N;
<br /> >> holter = sin(ST) + randn(size(ST));</p>
<p>Show E(holter|ST):
<br /> >> dependents_plot(ST,holter)
<br />Show E(holter|ST), conditional standard deviation, and maximum:
<br /> >> dependents_plot(ST,holter,[],{@mean, @std, @max})</p>
<p>Basically, you can show any statistics you need; all you need is to provide an appropriate function handle. For example, you can show different percentiles:
<br /> >> index_ = @(v,ii) v(ii);
<br /> >> perc = @(v,p) index_(sort(v(:)), max(round(numel(v)*p/100),1)); % find percentile (p= 0..100)
<br /> >> dependents_plot(ST,holter,[],{@(z) perc(z,10), @(z) perc(z,30), @median, @mean, @(z) perc(z,70), @(z) perc(z,90)});
<br /> >> legend('10%','30%','median','mean','70%','90%')</p>
<p>This submission is courtesy of Norav Medical (<a href="http://www.norav.com">www.norav.com</a>) - the leading company in the fields of PC-ECG, EKG Management systems and related non-invasive cardiac devices.
</p>Mark Matusevichhttp://www.mathworks.com/matlabcentral/fileexchange/authors/240213MATLAB 7.9 (R2009b)MATLABfalsetag:www.mathworks.com,2005:FileInfo/467662014-05-27T15:01:41Z2014-11-24T09:12:21ZHybrid Photovoltaic and Wind power systemGrid integration of hybrid PV / Wind power system.<p>Grid integration of hybrid PV / Wind power system.- If want Intelligent control based Hybrid PV/ wind power pls email me <a href="mailto:venkatmme@gmail.com">venkatmme@gmail.com</a>. I will send you</p>venkatesh Kumar Mhttp://www.mathworks.com/matlabcentral/fileexchange/authors/168197MATLAB 8.3 (R2014a)falsetag:www.mathworks.com,2005:FileInfo/485502014-11-24T09:10:28Z2014-11-24T09:10:28Zengdemoengdemo<p>engdemo</p>Yanhttp://www.mathworks.com/matlabcentral/fileexchange/authors/528071MATLAB 8.4 (R2014b)MATLABfalse