| Date | File | Comment by | Comment | Rating |
|---|---|---|---|---|
| 13 Oct 2009 | ISMEMBERF Floating-point ISMEMBER (i.e., with round-off tolerance) | Vargas Aguilera, Carlos Adrian | This is a nice function, thanks bruno for sharing it. You all may check out my NUMCMP function too. http://www.mathworks.com/matlabcentral/fileexchange/21190-numcmp-m Cheers, Carlos |
|
| 13 Oct 2009 | ISMEMBERF Floating-point ISMEMBER (i.e., with round-off tolerance) | Simon, Jan | Beside the fact, that this is of practical use and works as expected, it helps to answer dozens of questions in the newsgroup: why does ANY((0:0.1:1) == 0.3) reply FALSE???
|
|
| 10 Oct 2009 | ISMEMBERF Floating-point ISMEMBER (i.e., with round-off tolerance) | Luong, Bruno | Thank you David for pointing out the bug. I better workaround IMO is change the line #257 to:
|
|
| 09 Oct 2009 | ISMEMBERF Floating-point ISMEMBER (i.e., with round-off tolerance) | David | PROBLEM: ismemberf([0 1 2], 0) will return [0 0 0]. It seems this is because line 263 will auto-configure tol to zero which causes unexpected results in ihi (line 274) that causes tf to be set incorrectly in line 276. WORK-AROUND: This behavior can be avoided if 'tol' is explicitly set when calling ismemberf(). |
|
| 03 Oct 2009 | Min/Max selection Search for k smallest or largest elements in the array | Á, Rencheng | Thanks! It is very useful! |
|
| 01 Oct 2009 | Cubed sphere Generate a cubed-sphere geometry | Fei, Tai | ||
| 28 Sep 2009 | Min/Max selection Search for k smallest or largest elements in the array | Luong, Bruno | Marcello, Do you have MEX setup? If not, type he following in command line:
If it's already installed you have to locate mexopts.bat file somewhere under the directory $MATLABROOT (where the Matlab is installed), then modify OPTPATH variable in line #8 and line #12 of GETMEXOPTS. then try installation again. Bruno |
|
| 28 Sep 2009 | Min/Max selection Search for k smallest or largest elements in the array | Dude25 | That's look interesting.
thx
|
|
| 21 Sep 2009 | All Permutations of integers with sum criteria All Pernutations of integers with sum criteria | Petschel, Ben | Nice program. Users might also be interested in a looped solution using the function "nextwhile" in the NextVector toolbox <pre class="link">http://www.mathworks.com/matlabcentral/fileexchange/24757</pre>. If the entire matrix of combinations is needed then Bruno's version is faster (because row concatenation is slow) otherwise the looped solution is faster. |
|
| 20 Sep 2009 | Cubed sphere Generate a cubed-sphere geometry | Giaccari, Luigi | Maybe we can merge your function and mine: http://www.mathworks.com/matlabcentral/fileexchange/23959 This way the user can select if return triangular or quad patches... Let me know if you are interested |
|
| 08 Sep 2009 | MPS format exporting tool Convert linear programming problem (MATLAB matrices) to MPS format | Trötscher, Thomas | Works nicely with ILOG CPLEX 11 at least |
|
| 22 Aug 2009 | Plot earth Plot earth in 3D | Xianjun, Pan | ||
| 01 Aug 2009 | Sparse sub access This package allows to retreive and assign values of sparse matrix in one shot. | Lamb, Anthony | Sorry about that.... I think that the following code does the trick
|
|
| 01 Aug 2009 | Sparse sub access This package allows to retreive and assign values of sparse matrix in one shot. | Lamb, Anthony | Very good!!!! It works well for building global stiffness matrices for finite element computations. While building my stiffness matrices I currently do the following
Bruno...Is there any other way your code can be used to get this done?? |
|
| 18 Jul 2009 | kronecker Kronecker tensor product | Shin, Minchul | ||
| 17 Jul 2009 | N-dimensional histogram Compute n-dimensional histogram | Golden, Daniel | Works great! I'm using it to make a 2-dimensional histogram with an additional third dimension of "weights." |
|
| 25 Jun 2009 | kronecker Kronecker tensor product | Mayowa | ||
| 25 Jun 2009 | kronecker Kronecker tensor product | Fig, Matt | Fast, slick, well done.
|
|
| 25 Jun 2009 | kronecker Kronecker tensor product | Luong, Bruno | To Matt's comment #2: 2D error checking is introduced in KRON in recent Matlab version. KORNECKER is designed to replicate the same behavior (desirable?). A workaround (beside delete the error checing line) is: A = reshape(A,size(A,1),[]);
|
|
| 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. |
|
| 23 Jun 2009 | kronecker Kronecker tensor product | Mayowa | Hi, I found a faster implementaion here
function c = kron2(a,b)
|
|
| 31 May 2009 | N-dimensional histogram Compute n-dimensional histogram | Luong, Bruno | To Bin Zhang: The way HISTCN is design: If user supply m-edges [e1, e2, ..., e_m] then there are m-1 bins: bin1 : e1 <= X < x2
The Bin #m does not exist, unless if there is point hitting the right border: X == e_m You can indeed force the number of output bins to m by changing the line #66. to sz(d) = length(ed)-1 Thanks, Bruno |
|
| 29 May 2009 | N-dimensional histogram Compute n-dimensional histogram | zhang, bin | Hi, Bruno: Your coding is really elegant and excellent. ;-)
Due to this, when I provide, .i.e, 3 edges of size mx1, for a 3d matrix, I would get *count* as a (m-1)^3 rather than m^3 matrix. Am I misunderstanding sth here, or there is some special reason for this? Thanks,
|
|
| 18 May 2009 | Set partition List all partitions a set n elements | Fig, Matt | Very nice: smartly coded, fast, well implemented. |
|
| 18 May 2009 | Set partition List all partitions a set n elements | Luong, Bruno | Darren, thank you for the suggestion. I'll add an example of usage. Functions with more efficient engine will be soon upgraded. |
|
| 17 May 2009 | Set partition List all partitions a set n elements | Rowland, Darren | At last someone has implemented this functionality. Excellent!
|
|
| 05 May 2009 | Generalized orthogonalization Orthonormal basis of a set vectors with respect to a non-euclidian scalar product | Rowland, Darren | Efficiently and concisely coded. Excellent |
|
| 02 Mar 2009 | workspace create and manipulate variable names in the target workspace by using strings | Luong, Bruno | Originally the WORKSPACE was developed under Matlab 2008B.
|
|
| 24 Feb 2009 | find_idx Fractional binning | Luong, Bruno | Hi John, Thanks for your comment. Fair enough. histc is fater than interp1. I also discovered this fact recently (after I developed this code and benchmark various methods in fact), and this is something I did not expected. |
|
| 24 Feb 2009 | workspace create and manipulate variable names in the target workspace by using strings | Luong, Bruno | Hi us, Thank you for your comment. In depth, despite of your note, there are two advantages of the code and it is totally fair to compare WORKSPACE with EVAL IMHO: First: Within the WORKSPACE methods evalin is used for the sole purpose of retrieving the value of variable(s) from the workspace. Never evalin is evaluated with the RHS (statement with '=' sign'). Second: From the user point of view, he/she does not to worry about building EVAL with full statement. Expressions are evaluated directly, and no longer through string (except for the variable name) as with EVAL. Bruno |
|
| 23 Feb 2009 | workspace create and manipulate variable names in the target workspace by using strings | us | bruno, not REALLY a third choice: this snippet simply uses EVALIN in its core engine...
|
|
| 22 Feb 2009 | find_idx Fractional binning | D'Errico, John | This would be useful to anyone implementing an interpolant in one dimension, or for those writing an interpolation in higher dimensions on a regular lattice. For example, a tensor product interpolant would benefit from this code as the first step, as would some other methods. I won't offer a rating since I cannot test this without a c-compiler, and without the presence of the compiled version, it just calls interp1 as the engine. It looks well done to me from a quick read through of the code though. I won't make any claim about the c code, since I have no skills in that respect. I'm not sure about the speed claim though, since if the author has based the claim of speed to a comparison to interp1, I can achieve a 55% reduction in time over interp1 just by a simple call to histc. xgrid = (0:.1:10);
tic,dx=diff(xgrid);[junk,B]=histc(xi,xgrid);B=B+(xi-xgrid(B))./dx(B);toc
tic,B = interp1(xgrid,(1:length(xgrid)), xi);toc
Both code fragments generate the same outputs, yet the histc one is considerably faster, and written in basic matlab. Any comparison of time should use this as the reference, not interp1. |
|
| 05 Mar 2008 | All Permutations of integers with sum criteria All Pernutations of integers with sum criteria | von Winckel, Greg | Great stuff. I used your work in my code that I just submitted here, but forgot to give credit. I will fix that as soon as I can modify the entry. Thanks for your help! |
|
| 13 Dec 2007 | All Permutations of integers with sum criteria All Pernutations of integers with sum criteria | D'Errico, John | A slick solution to this problem, that uses an elegant recursive code for its work. Good help, error checks, defaults for arguments where they apply. One minor flaw that I'll hope the author fixes. There is no H1 line. An H1 line is the first line of help. It should be a descriptive line that the function lookfor keys on, including all reasonable keywords that you might search on. Lookfor is useful when you need to find this function in a year. Will you remember the name "allVL1" next year? No, probably not. But lookfor will find this function for you, if you supply an H1 line. |
|
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