| Date | File | Comment by | Comment | Rating |
|---|---|---|---|---|
| 23 Nov 2009 | Unique Rows for cell arrays Find the unique rows of a cell array containing columns with strings or scalars. | Fig, Matt | This is much faster, and has no requirement as to types or ordering: ii = 1;
For example, try it with:
|
|
| 31 Oct 2009 | COMBINATOR -combinations AND permutations Returns 1 of 4 different samplings on the set 1:N, taken K at a time. | Fig, Matt | Michele,
|
|
| 07 Sep 2009 | 35 Complete GUI Examples 35 working GUIs to read and learn. | Fig, Matt | Cyberfrog,
|
|
| 06 Sep 2009 | 35 Complete GUI Examples 35 working GUIs to read and learn. | Fig, Matt | Hello CyberFrog,
No *.fig file is generated because these are M-file GUIs. GUIDE works by generating two files, an M-File which has the code, and a figure file which has the graphics. These are simply two different ways of doing GUIs in MATLAB. I much prefer to write my GUIs without GUIDE for many reasons, only one of which is that I need to keep track of only one file! This collection, as is stated in the description, is meant to help people write GUIs without using GUIDE. |
|
| 04 Sep 2009 | ATAN2_SAFE To perform the same function as Matlab built-in function atan2 but safely guarded against erroneous | Fig, Matt | Actually atan2 is fine. The source of the error in your example is this line: [x2 y2 z2] = sph2cart(t2, p2, r2); % step 5b The value of y2 should equal zero but there are round-off errors occurring. If you simply assign y2 = 0 after this line in your example, you will see that t1 is back at zero as expected. This has nothing to do with atan2. |
|
| 04 Sep 2009 | NUMUNIQUE Returns unique elements in an array and all the indices for the repetitious values. | Fig, Matt | Well done. About the only thing I would change would be to replace these lines: n = 1:N;
with n = find(diff([nan; x])); On my machines this can make a significant difference in speed. Other than that, great code! |
|
| 20 Aug 2009 | Newton Raphson method for transcendental equations This file computes roots of a given trancendental equation using the Newton-Raphson method. | Fig, Matt | Three comments. 1. I do not see where you mention that this file needs the symbolic toolbox to run. It does. I wouldn't have downloaded it if I had known that because I don't have the symbolic toolbox. You should update the description to reflect this requirement. 2. Rating your own files is not good behavior. Everyone expects that an author likes his own files or he wouldn't have submitted them. Please don't try to trick people into thinking your file is esteemed by the community. Let others rate your files, then your skills and file quality can grow, and people looking for a quality file won't be misled by false ratings. 3. A numerical alternative that works for Shahrir's problem is:
|
|
| 19 Aug 2009 | ColorWeight (double version) The color weight without weight. | Fig, Matt | us, You're not use correct metric for this time frame evaluation. Pi==NaN with the reference parameter of half, in this case. So it is not of concern to you for this solution, and scientific resolution is fine.
|
|
| 13 Aug 2009 | 35 Complete GUI Examples 35 working GUIs to read and learn. | Fig, Matt | Tanguy,
|
|
| 09 Aug 2009 | ds group contribution | Fig, Matt | A script. Not one single comment, let alone explanation. |
|
| 09 Aug 2009 | AutoWarnDlg Self-terminating modal warning dialog with flashing icon | Fig, Matt | Works well. One thing I would like to see added is an optional second output which stores whether the dialog terminated due to timeout or user acknowledgment. That way if this was called from a code which was running automatically, the user could be notified that a warning was thrown earlier. This could be useful for debugging. |
|
| 01 Aug 2009 | Fractions Toolbox create and manipulate fractions (K+N/D) using exact arithmetic | Fig, Matt | Great work! |
|
| 28 Jul 2009 | 35 Complete GUI Examples 35 working GUIs to read and learn. | Fig, Matt | Thanks someone,
|
|
| 28 Jul 2009 | 35 Complete GUI Examples 35 working GUIs to read and learn. | Fig, Matt | I like the contents.m idea, and I might as well since a typo has already been found. In the pdf I refer to a comment in GUI_30. I should have put GUI_32. File will be updated. |
|
| 13 Jul 2009 | N_PERMUTE_K All possible permutations of the elements of set N, taken K at a time, with repetition. | Fig, Matt | Juliette, You cannot index the output of npermutek(1:5,5) into an array (nuc) of length 4! The index exceeds dimensions because the output of the above call to NPERMUTEK will have many '5's in it. You will get the same error by doing this: nuc = 'ABCD'
This is not an NPERMUTEK problem, it a user misunderstanding the output problem. |
|
| 07 Jul 2009 | reshape2cube Reshape a vector into a cubic array | Fig, Matt | I am with Darren. Maybe a generalization would be more useful: A = 1:5^2;
|
|
| 29 Jun 2009 | Longest Common Substring Gives the longest common substring between two stings. | Fig, Matt | Something is still wrong. [D,G,S] = LCS('fbce','abcde');S
|
|
| 29 Jun 2009 | flattin/merging nested cells {{a}, b, {c,{d;e}}} --> {a,b,c,d,e} | Fig, Matt | If you are going to use the recursive engine, you need to change your description. The depth of nesting this function can handle will be limited by the default recursion limit.
|
|
| 25 Jun 2009 | flattin/merging nested cells {{a}, b, {c,{d;e}}} --> {a,b,c,d,e} | Fig, Matt | Bruno,
N = 10; c = {};
tic
tic
isequal(M1,M2) % Not necessarily. To Oleg: In actuality, what Bruno's code does seems to me more useful. What is the purpose for flattening EVERYTHING in the cell? |
|
| 25 Jun 2009 | kronecker Kronecker tensor product | Fig, Matt | Fast, slick, well done.
|
|
| 24 Jun 2009 | EXPAND Replicate and tile each element of an array. | Fig, Matt | Another reason I bypassed kron is illustrated here: http://i217.photobucket.com/albums/cc229/spamanon/tester_output-2.png Urs, I think you are correct about mentioning kron in the see also. |
|
| 24 Jun 2009 | kronecker Kronecker tensor product | Fig, Matt | My only question is why the function errors out for non- 2D inputs? The stock MATLAB function does not error, and if I take the offending lines of code out of kronecker, the results match. |
|
| 24 Jun 2009 | kronecker Kronecker tensor product | Fig, Matt | Mayowa, Indeed that is faster for smaller A,B. However, for larger A and B, kronecker is several times faster. |
|
| 24 Jun 2009 | EXPAND Replicate and tile each element of an array. | Fig, Matt | Hello Jos, There are a couple of reasons I bypassed kron. The main reason is that expand, even with error checking etc., is faster on my machine(s): A = reshape(randperm(24),6,4);
For
expand also works for your second example.
|
|
| 19 Jun 2009 | Pollock Paint like Jackson Pollock in Matlab | Fig, Matt | Cool idea! Works well. |
|
| 17 Jun 2009 | subarray Extracts a subarray from an array. Useful for function outputs. | Fig, Matt | You could also do this: a = foo(x,y,z);
Then there is no temporary variable polluting your workspace. |
|
| 02 Jun 2009 | findsubmat Finds one matrix (a sub-matrix) within another. | Fig, Matt | Siyi, Your code, as written, will work when there is one submatrix within A. However, it will need to be modified for multiple submatrices. Even without the modification, it is slower to use the approach you suggest. In the following, I made a copy of findsubmat, took out all of the NaN checking and the transposing of A, and put your code in the proper place. Here are some results: A = round(rand(2000)*1);
tic
tic
Also, this is really the kind of exchange that better takes place through email. Mine is listed in the help for findsubmat.
|
|
| 28 May 2009 | isodd: a pedestrian parity checker ISODD returns TRUE for integers of any numeric MATLAB class that are not evenly divisible by 2 | Fig, Matt | Finally, a standard file which can be referenced for the perennial NG question! Well done. Thanks Urs. |
|
| 19 May 2009 | PARTITIONS Finds all partitions of a set, or only those partitions of a specified length. Includes a viewer. | Fig, Matt | An update has been submitted which allows user to enter the set to be partitioned. For example: partitions(['a','b','c']) |
|
| 18 May 2009 | Set partition List all partitions a set n elements | Fig, Matt | Very nice: smartly coded, fast, well implemented. |
|
| 07 May 2009 | mfiles/matfiles/figfiles Contains three functions for displaying different files with links. | Fig, Matt | Wolfgang, I realized that after I posted the screenshot. I believe that file was my first experience with that author. Funny to see it now and everyone knows where it came from :-). |
|
| 05 May 2009 | findsubmat Finds one matrix (a sub-matrix) within another. | Fig, Matt | Good point us, I will submit an update. |
|
| 04 May 2009 | N_PERMUTE_K All possible permutations of the elements of set N, taken K at a time, with repetition. | Fig, Matt | nargin is a built-in Matlab function, as is numel. Take these questions to email please! My email address is in the file. |
|
| 04 May 2009 | N_PERMUTE_K All possible permutations of the elements of set N, taken K at a time, with repetition. | Fig, Matt | Hoda, numel is a built-in Matlab function which returns the Number of ELements in the argument. If your version of Matlab is too old to have numel, you may have to write your own. For vector inputs to npermutek, you can also replace numel with length. |
|
| 01 May 2009 | How fast is your graphics card? Creates a challenging 3-d benchmark for graphics processing speed measurement. | Fig, Matt | 4.4 on my Dell XPS M1710, ver 2007a, Vista Home Premium, Invidia GeForce Go 7900 GS |
|
| 27 Apr 2009 | MATLAB Responds to Greeting MATLAB replies back when you type "hi" into the command window, with eleven possible responses. | Fig, Matt | Looking at the code I have some suggestions. Do you really need the vector M? (No)
|
|
| 03 Apr 2009 | Conditional Nonparametric Kernel Density Condtional Kernel Density Estimate with normal kernel and LSCV bandwidth selection | Fig, Matt | Please don't rate your own files.
|
|
| 25 Mar 2009 | Get the Slope and Intercept of drawn Lines You have to draw a line in a graph to obtain the slope of a curve or of its tangent. | Fig, Matt | This really needs some improvement. Since there is no help of any value, I had to read a bit of the code to figure out what I was supposed to do. >> plot(1:10)
Fix the code and have a look at the help for the Matlab function 'max' as an example of how to write the help for your function. |
|
| 19 Mar 2009 | FIND for n-D: Find indices and values of nonzero elements in n-D matrix FINDN is the FIND function for n-D matrix | Fig, Matt | This seems a little faster for large number of dimensions: IDX = find(A);
Something to consider. |
|
| 19 Feb 2009 | axescenter Puts axes in the center of a plot. Zooming, panning and some command line manipulations allowed. | Fig, Matt | Sergei noticed that if the parent of the current axes is not a figure, AXESCENTER will not position correctly. He had called AXESCENTER for an axes that was in a uipanel. An update is on the way. |
|
| 13 Feb 2009 | axescenter Puts axes in the center of a plot. Zooming, panning and some command line manipulations allowed. | Fig, Matt | I realized I should have a check that the input arg is a handle of the correct type. Update on the way. |
|
| 10 Feb 2009 | Quadratic Equation Calculator Quadratic Equation Calculator | Fig, Matt | I gave two stars because by running this program, the root is changed then not changed back. That is not a good way to make users of your code happy. When the user closes the GUI, you need to set colordef back to what it was prior to initialization. I will change my rating when this is fixed. |
|
| 10 Feb 2009 | Quadratic Equation Calculator Quadratic Equation Calculator | Fig, Matt | In the lines where you calculate the quadratic formula, you need a parenthesis around the 2*a, like this;
|
|
| 24 Dec 2008 | Matfig2PGF Convert figures to PGF files that can be included in LaTeX documents. | Fig, Matt | I like the name! |
|
| 13 Nov 2008 | Min Max Game A simple guessing game between the number 1 and 100. | Fig, Matt | This is a script that issues a clear command - NOT A GOOD IDEA. Please only submit functions to the file exchange. There is no need for 3 separate files to make the game you want. Everything you are using the ask.m and check.m functions to do can be done in a simple while loop! |
|
| 31 Oct 2008 | whats Duplicates the output of Matlab function WHAT, with clickable links. | Fig, Matt | Hey Mike, my email address should be listed at the bottom of the help for all of my files on the FEX. Thanks. |
|
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.
Contact us at files@mathworks.com