tag:www.mathworks.com,2005:/matlabcentral/fileexchange/feedMATLAB Central File Exchangeicon.pnglogo.pngMATLAB Central - File Exchange - category:"Programming and Data Types"User-contributed code library2014-11-27T03:37:54-05:0014621100tag:www.mathworks.com,2005:FileInfo/175382007-11-15T04:59:42Z2014-11-21T10:59:48Zpiecewise cubic interpolationCode to interpolate function values and corresponding derivatives.<p>Piecewise cubic interpolation and approximated calculation of first and second derivative at the interpolation point.</p>Orlando RodrÃguezhttp://www.mathworks.com/matlabcentral/fileexchange/authors/17521MATLAB 5.2 (R10)MATLABfalsetag:www.mathworks.com,2005:FileInfo/223772008-12-10T11:46:34Z2014-11-20T21:37:09ZintersectPlaneSurfIntersection points of an arbitrary surface with an arbitrary plane.<p>out=intersectPlaneSurf(p0, v, exx, eyy, ezz)
<br />Intersection of a surface with an arbitrary plane. The plane must be specified with "p0" which is a point that the plane includes and a normal vector "v" of that plane.
<br />"exx", "eyy" and "ezz" is the surface coordinates such that can be used with surf command. the uotput "out" is a nx3 cell that contains n number of discreete intersection regions in 3d coordinaetes.
<br />You can use provided example file to get the result that is used in screenshot.</p>
<p>Note: You have to download geom3d toolbox by David Legland from FEX to visualize results correctly, and "myfrenet" function which i provide that can use example file</p>Mehmet OZTURKhttp://www.mathworks.com/matlabcentral/fileexchange/authors/28380MATLAB 7.6 (R2008a)MATLABSystem Identification Toolboxfalsetag:www.mathworks.com,2005:FileInfo/285532010-08-25T10:50:58Z2014-11-20T19:57:45ZLINSPACE3: linearly spaced vector defined by three pointsGenerate a vector as linearly spaced as possible while still including three defined points.<p>LINSPACE3 linearly spaced vector including a defined middle point.
<br />LINSPACE3(X1, X2, X3) generates a row vector of 100 points between X1 and X3 as linearly spaced as possible such that the vector contains X2.
<br />
<br />LINSPACE3(X1, X2, X3, N) generates a row vector of N points.</p>
<p>[V, IND] = LINSPACE3(...) also returns the index, IND, of X2 in the vector.</p>
<p>LINSPACE3 will always contain X1, X2, and X3 without repeating an element.
<br />
<br />For N < 3, LINSPACE3 returns the shortest possible vector containing all of X1, X2, and X3. This is normally [X1 X2 X3]. However, if X1=X2 or X2=X3, LINSPACE3 returns [X1 X3].</p>
<p>One use of LINSPACE3 is, for example, in generating points to evaluate in a sensitivity study where one decision variable, at a certain point (X2), is also restricted by bounds (X1, X3).</p>Sky Sartoriushttp://www.mathworks.com/matlabcentral/fileexchange/authors/101715MATLAB 7.5 (R2007b)2833728358falsetag:www.mathworks.com,2005:FileInfo/118962006-08-05T08:25:57Z2014-11-20T18:58:04ZUFget: MATLAB interface to the UF sparse matrix collectionDownloads sparse matrices from the web directly into the MATLAB workspace, from a vast range of real<p>UFget is a MATLAB interface to 2650 sparse matrices (as of Nov 2014) for a wide range of applications, in the UF sparse matrix collection (<a href="http://www.cise.ufl.edu/research/sparse/matrices">http://www.cise.ufl.edu/research/sparse/matrices</a>).
<br />Problem = UFget ('HB/arc130'), for example, downloads the matrix of that name. An index is available, making it simple to write an M-file that (for example), downloads all symmetric positive definite matrices one at a time, sorted by the number of nonzeros in the Cholesky factorization after a minimum degree (AMD) ordering.</p>
<p>UFweb ('HB/arc130') opens the web page for the same matrix.</p>
<p>NOTE: tested on 32-bit and 64-bit Linux, and 32bit Windows. Untested on Windows64; if you try it there, please let me know how it works. It should be fine.</p>
<p>MATLAB 7.0 or later is required because of the MAT-file format the matrices are stored in.</p>Tim Davishttp://www.mathworks.com/matlabcentral/fileexchange/authors/908MATLAB 7.5 (R2007b)MATLABMATLAB 7.0 or later is required (the *.mat files cannot be read by earlier versions).falsetag:www.mathworks.com,2005:FileInfo/485112014-11-19T17:53:50Z2014-11-20T18:29:47ZBayesian Linear RegressionThis is a set of MATLAB functions to do Bayesian linear regression<p>This is a set of MATLAB functions to do Bayesian linear regression. Derivations are also included.</p>Soumya Banerjeehttp://www.mathworks.com/matlabcentral/fileexchange/authors/192000MATLAB 8.4 (R2014b)falsetag:www.mathworks.com,2005:FileInfo/460702014-03-28T15:12:11Z2014-11-20T10:56:31Zplot_subroutinesplots the subroutines in a function, and their dependencies on each other<p>plot_subroutines('foo.m') plots a node map of the subroutines in a function, and their dependencies.
<br />The screenshot is a sample output for the function plot_subroutines.m itself.</p>Christopher Pedersenhttp://www.mathworks.com/matlabcentral/fileexchange/authors/121674MATLAB 8.3 (R2014a)MATLAB1592427608falsetag:www.mathworks.com,2005:FileInfo/460802014-03-29T09:33:20Z2014-11-20T10:55:48Zplot_depfunplots a graph of the dependencies of a function<p>wrapper for depfun that plots the results to a node graph of dependencies
<br />faster than regular depfun due to using multiple calls with the -toponly option.
</p>Christopher Pedersenhttp://www.mathworks.com/matlabcentral/fileexchange/authors/121674MATLAB 8.3 (R2014a)MATLAB2465227608falsetag:www.mathworks.com,2005:FileInfo/315322011-05-23T08:51:56Z2014-11-20T08:07:59ZPack & Unpack variables to & from structures with enhanced functionalityv2struct packs and unpacks variables to and from structures with enhanced functionality.<p>v2struct has dual functionality in packing & unpacking variables into structures and vice versa, according to the syntax and inputs.
<br />Function features:
<br /> * Pack variables to structure with enhanced field naming
<br /> * Pack and update variables in existing structure
<br /> * Unpack variables from structure with enhanced variable naming
<br /> * Unpack only specific fields in a structure to variables
<br /> * Unpack without over writing existing variables in workspace</p>
<p>In addition to the obvious usage, this function could by highly useful for example in working with a function with multiple inputs. Packing variables before the call to the function, and unpacking it in the beginning of the function will make the function call shorter, more readable, and you would not have to worry about arguments order any more. Moreover you could leave the function as it is and you could pass same inputs to multiple functions, each of which will use its designated arguments placed in the structure.</p>
<p>Moreover, the function enables extracting specific fields from a structure according to field names. This enhances the flexibility and ease of use of structures, for example it allows you to pass same inputs as structures to multiple functions, each of which will use its designated
<br />arguments placed in the structure.</p>
<p>Some examples:
<br /> Simple pack:
<br /> x = zeros(3);
<br /> y = 'Testing123';
<br /> z = cell(2,3);
<br /> fieldNames1 = {'fieldnames','x','y','z'};
<br /> fieldNames2 = {'fieldnames','a','b','c'};
<br />
<br /> >> S = v2struct(x,y,z)
<br /> S =
<br /> x: [3x3 double]
<br /> y: 'Testing123'
<br /> z: {2x3 cell}</p>
<p> pack with different field names:
<br /> >> S = v2struct(x,y,z, fieldNames2)
<br /> S =
<br /> a: [3x3 double]
<br /> b: 'Testing123'
<br /> c: {2x3 cell}</p>
<p> update existing structure with additional field:
<br /> >> S.oldField = 'field to be saved for future use'
<br /> >> S = v2struct(x2, nameOfStruct2Update, fieldNames3)
<br /> S =
<br /> oldField: 'field to be saved for future use'
<br /> x: [3x3 double]</p>
<p> simple unpack:
<br /> S.x = zeros(3);
<br /> S.y = 'Testing123';
<br /> S.z = cell(2,3);
<br /> fieldNames3 = {'y'};
<br /> >> v2struct(S)
<br /> y
<br /> y =
<br /> Testing123</p>
<p>More examples, further comments and demo usage are available inside the .m file and the demo functions.</p>
<p>Comments, suggestions, bug reports and any other feedback is welcomed at adi.navve[at]gmail[dot]com</p>
<p>Inspired by the function 'mmv2truct' from the Mastering Matlab Toolbox (available free) by D.C. Hanselman, University of Maine, Orono, ME 04469 4/28/99, 9/29/99, renamed 10/19/99 Mastering MATLAB 5, Prentice Hall, ISBN 0-13-858366-8
<br />available at: <a href="http://www.eece.maine.edu/mm/MM6/tbx.html">http://www.eece.maine.edu/mm/MM6/tbx.html</a></p>Adi Navvehttp://www.mathworks.com/matlabcentral/fileexchange/authors/148428MATLAB 7.12 (R2011a)MATLABfalsetag:www.mathworks.com,2005:FileInfo/328752011-09-13T08:20:46Z2014-11-19T23:14:40ZFinite Element Triangular Mesh GeneratorThis function generates triangular mesh for a rectangular shape structure for FEM analysis<p>The function femTriangularMeshGenerator() generates triangular mesh for a rectangular shape structure for Finite Element analysis.
<br />The outputs are:
<br />coords = x and y coordinates of each element nodes
<br />cT = nodal connectivity
<br />nNodes = Number of nodes</p>
<p>The inputs are:
<br />Lx = width of the rectangular structure
<br />Ly = Height of the rectangular structure
<br />Nx = Number of divisions on x- axis
<br />NE = Number of elements</p>
<p>The example generates 144 elements for a rectangular structure given a dimension 10units by 10units with respect to 8 divisions on x-axis.</p>Kehinde OROLUhttp://www.mathworks.com/matlabcentral/fileexchange/authors/67260MATLAB 7.10 (R2010a)MATLABfalsetag:www.mathworks.com,2005:FileInfo/311032011-04-19T06:05:07Z2014-11-19T22:05:20ZFind values in a vector or function For a function y=f(x), this script looks for all the "x" values for a desired value of "y" (y0).
<p>Given a desired value "y0", this function finds all the elements "y" in a vector whose values are the closest to "y0" in the whole vector, and also the positions "xi". So, the output is a set of points [xi,y0] given in two vectors, one for the values and another one for the positions.
<br />The inputs are:
<br />-Vector.
<br />-Value that you want to find in the vector "y0".</p>
<p>The outputs are:
<br />-The closest values to "y0" in the function (by means the real "y" values).
<br />-The position "xi" of those "y" values.</p>
<p>I hope it is useful for all of you. If you have any suggestion, please, tell me.</p>Adrian Lara-Quintanillahttp://www.mathworks.com/matlabcentral/fileexchange/authors/133913MATLAB 7.9 (R2009b)MATLABfalse