| Date | File | Comment by | Comment | Rating |
|---|---|---|---|---|
| 31 Jul 2010 | Arduino Target Develop applications for the Arduino platform using SimulinkĀ®. | gomez, marco | I have the same error:"Error in S-Function", but how compile for 64 bits?...i don't know. Thank you |
|
| 31 Jul 2010 | nsumk Returns a listing of n-tuples of non-negative integers adding up to k | D'Errico, John | No! There is no reason to cause help to fail, forcing the user to use type instead! I never suggested that. When did I ever recommend an idea like that? All that you need to do to enable lookfor is to include ONE MORE LINE, at the very beginning of the help block!!!!!!!!!!! The comment block should be contiguous, to enable both help and lookfor. Look at EVERY MATLAB function that MathWorks provides. Read the help for lookfor, As far as the use of your function goes and the help itself, all that I have asked is that you make the help clear, explaining what it does, rather than forcing the user to divine exactly what you mean when you say the word "tuple". While you may feel this is obvious, other users will not have the same background. So make your help clear. Is this really difficult to do? Tell the user what happens when they pass in a vector, don't make them guess that the only piece of information that you take from that vector is the length of the blasted thing!!!!!!! Good code is friendly to the user. Bad code makes the user make wild, unsupported guesses, and then returns arbitrary results when they lack the ability to read the mind of the author. |
|
| 31 Jul 2010 | Simulink programmable pulse generator A pulse generator with amplitude, pulse width, and pulse period inputs. | rai, upma | Hiii
|
|
| 31 Jul 2010 | Spectrum Scope Easily compute and display a real-time FFT. | Patel, Bhavik | Hey guys how does this file work ? I have a file which is split in to two columns time with pressure I want to do the FFT on this within Matlab but im a little lost. Anyone guide me in the right direction please? Kind Regards,
|
|
| 31 Jul 2010 | Calculation of distances from a given set of points to a set of segments A fully vectorised calculation of distances from a given set of points to a set of segments. | Steve | This is exactly what I needed. Thanks very much, that's a great contribution. |
|
| 31 Jul 2010 | N-dimensional histogram Compute n-dimensional histogram | Fripp, Matthias | About plotting the results: Jaclyn, if you just want bars plotted for the pairwise densities of two variables (i.e., a plot with x and y axes corresponding to values of your variables, and vertical bars on the x,y grid, corresponding to the counts for each 2D bin), you can get that with hist3(). Will, if you want to plot weights for 3 variables as varying sizes of bubbles on an x,y,z grid, you can do something like this: % get the histogram
% make a grid for plotting
% calculate sizes so the most dense cell gets a value of 100
% plot the densities
|
|
| 31 Jul 2010 | Toolbox Fast Marching A toolbox for the computation of the Fast Marching algorithm in 2D and 3D. | jinguo, wang | Thank you for your share!But there is a error that mex/perform_front_propagation_2d.cpp' not found,when i run compile_mex file.So i wanna get your help! Thanks! |
|
| 31 Jul 2010 | Toolbox Fast Marching A toolbox for the computation of the Fast Marching algorithm in 2D and 3D. | jinguo, wang | ||
| 31 Jul 2010 | ploterr plots data with x and/or y error bars and supports logarithmic scaling for both axes. | Boris | Hi, can someone give an example how more then 1 line can be plotted together?
Thanks. Boris |
|
| 31 Jul 2010 | Optical Character Recognition (OCR) The aim of OCR is to classify optical patterns corresponding to alphanumeric or other characters. | sekhar, mrudula | hi sir, ur work is really good.
|
|
| 30 Jul 2010 | nsumk Returns a listing of n-tuples of non-negative integers adding up to k | Cotton, Peter | Dear John, I see where you got the idea this was supposed to be the same as nchoosek (because it uses the same convention for ordering tuples and has the same limitations). However, this would seem to be in contradiction with the first English line of help, where that elusive definition is hiding. There is also a definition for the vector case: "listing of n-tuples of non-negative integers adding up to k" and miraculously, this function performs accordingly: x = nsumk(1:5,2) returns a list of 5-tuples of non-negative integers, as advertised, 5 being the length of 1:5. The first three happen to be: 0 0 0 0 2
All rows sum to 2, also as advertised. (Incidentally it may be possible to create a vector of length 5 in fewer characters than 1:5 but I leave that to others). The overloading is the same as nchoosek. If you want to produce lists I know of no shorter means than > nchoosek(1:5,2)
All that said, I agree with you that the usage "help" is inconsistent and/or foreign. To be precise (in the same style) I could write x: nchoosek(k+length(n)-1,length(n)-1) x length(n) - listing of non-negative integers with rows summing to k but I suggest that you would prefer me to break my practice of including the function signature (thereby forcing users to "type nsumk" rather than "help nsumk" as per Mathworks tradition, but allowing help in the style of nchoosek), or not tell the user the dimensions of the output (another fine tradition). Here then is my suggestion: function x = nsumk(v,k)
if isscalar(v),
You like ? Kind Regards, Peter |
|
| 30 Jul 2010 | nsumk Returns a listing of n-tuples of non-negative integers adding up to k | D'Errico, John | I am NOT proposing anything. I merely tried to read the help for your own function, then tried to convince you that your code needs documentation when used in a way that your help says is possible. Here are a couple of lines, written by you! % Usage 2: x = nsumk(1:5,2)
Exactly how should your code work? What is the behavior of your code when it is passed a vector input for n? You need to define that. And to this point, I have seen no definition, no explanation. I've seen multiple references to nchoosek, that your code is related in some way to nchoosek. Therefore I assumed that when I call it in a way that I would call nchoosek, I might get a similar result. If this is false, then you need to document your own code properly. I am not suggesting any new functionality for this code. Merely that you document the EXISTING functionality so that a person who might want to use it can do so. |
|
| 30 Jul 2010 | nsumk Returns a listing of n-tuples of non-negative integers adding up to k | Cotton, Peter | Dearest John, Thank you once again for your continued interest in this important matter. And thank you for the idea of modifying the overloading of the first input argument. However clearly I might comment the help code for this new and improved function per you proposal, I fear that it may remain somewhat confusing. Your suggestion amounts to the following: Usage 1: nsumk(n,k) returns the # of n-tuples summing to k
whereas at present: Usage 1: nsumk(n,k) returns the # of n-tuples summing to k
I agree that the overloading is a little awkward either way but I don't think the former is an improvement over the latter. I fear we may have strayed however in our joint undertaking to improve the help for this vital function. Perhaps we should consider more precisely which part of "n-tuples of non-negative integers adding up to k" you find unclear, and why it is that we should disqualify those deeply offensive numbers greater than n, as per your example of 4 and 5 above? I fear the vast community of users will be greatly disappointed should they struggle through my hopelessly unclear description only to find that nsumk(1:2,5) returns the empty set. Kind regards, Peter |
|
| 30 Jul 2010 | SLM - Shape Language Modeling Least squares spline modeling using shape primitives | Avital, Royi | John, Thank you for your response.
I'll try to have a look at De Boor's book.
One day, If you do write an article or notes about it I'd be happy to read and learn. Thank you. |
|
| 30 Jul 2010 | subfigure Create a figure within a grid-based layout. Like subplot, but for figures. | Boardman, Ian | This does not create an array of figures, but merely an array of axes. Just run get(get(subfigure(m,n),'Children'),'Type')
|
|
| 30 Jul 2010 | nsumk Returns a listing of n-tuples of non-negative integers adding up to k | D'Errico, John | Yes, but if you will argue that this code is in any way consistent with nchoosek, then it must be so. In the example I posed, nsumk(1:3,5) yields numbers that are not in that set! Zero is not in the set. 4 is not in the set. 5 is not in the set. So clearly your code is not consistent with nchoosek, despite multiple statements that it is. You say what your code does and doe not require, but no place do you state that in the help. If you do not state what your code does, then how will anybody else ever find it of value? Next, if you have lost the code before, then this is even a better reason to enable lookfor. Use an H1 line. Use a help style that at least tries to follow the style of help that the MathWorks uses. This makes your code more useful to others. Otherwise, it is of no use to anybody but you. |
|
| 30 Jul 2010 | Handling Large Data Sets Efficiently in MATLAB Handling Large Data Sets Efficiently in MATLABĀ® | Nouyed, Naved | Here's the updated link to the webinar mentioned above: http://www.mathworks.com/company/events/webinars/wbnr30435.html?id=30435&p1=32517&p2=32518 |
|
| 30 Jul 2010 | nsumk Returns a listing of n-tuples of non-negative integers adding up to k | Cotton, Peter | John, Thanks for the extremely speedy feedback. Zero is a non-negative integer, and we do not require the integers here to be less than the number of variables. In generally accepted parlance the term tuple usually means an ordered list of elements, so I think the intent is clear. Sorry for my brevity. FYI it is a natural way to list polynomials in n variables of degree precisely k. As is evident from the code this is little more than syntactic sugar for nchoosek, but since I've lost it once before I'm sticking it here! Peter |
|
| 30 Jul 2010 | WiMAX 802.16e Physical Layer WiMAX Physical Layer Implementation in Simulink | Kevin | can you please send me the documentation if that is still possible.
|
|
| 30 Jul 2010 | nsumk Returns a listing of n-tuples of non-negative integers adding up to k | D'Errico, John | Also, the help needs to be explicit about whether the pair of integers {2,3} is distinct from the pair {3,2}. I would argue that is an extremely important distinction. This code seems to count them both. |
|
| 30 Jul 2010 | nsumk Returns a listing of n-tuples of non-negative integers adding up to k | D'Errico, John | I would first point out that my own partitions.m solves exactly this problem, as well as a flexible variety of related problems. http://www.mathworks.com/matlabcentral/fileexchange/12009 A quick test shows there to be a problem here though. Use nsumk to find all sums of tuples of the integers 1:3, that sums to 5. The help seems to indicate that this is possible, using the following call: nsumk(1:3,5)
But clearly, that interpretation seems to fail, since nsumk uses 4 and 5 in those sums. The help here seems reasonable, although it lacks an H1 line. AN H1 line is valuable when next month or next year, you simply cannot recall the name of that blasted function you wrote or downloaded long ago. It enables the function lookfor, which uses the very first line of your help. By putting a single line of intelligent description there, you can now use lookfor to do a keyword search of those H1 lines. There are no error checks in this code. Of course, how can you check for errors when the help is not quite clear about what the arguments mean? |
|
| 30 Jul 2010 | A Fast Image Segmentation using Delaunay Triangulation A fully automated process that does not require initial estimate of number of clusters. | Samir | Yet another brilliant piece of code from you Abbas! Thank you very much for posting that. |
|
| 30 Jul 2010 | A Fast Image Segmentation using Delaunay Triangulation A fully automated process that does not require initial estimate of number of clusters. | Samir | ||
| 30 Jul 2010 | Kalman Filter Application two factor CIR Estimates the parameters of the two factor CIR model on the UK German, and US term structures. | Yu, Qinyu | Hi Hils, could you tell me how did you decide the initial parameter value as input ? Thank you very much! |
|
| 30 Jul 2010 | Using Doxygen with Matlab Extracts automatically comments from your Matlab .m files using Doxygen to generate documentation | McDonnell, Matt | Very nice tool - many thanks!
|
|
| 30 Jul 2010 | SLM - Shape Language Modeling Least squares spline modeling using shape primitives | D'Errico, John | I wish I had written a paper on this topic years ago when I wrote the first version of this tool. I did not do so then, although I have given a few talks on the underlying modeling philosophy of these tools. The basic idea is simply that of a least squares spline, augmented by a smoothness penalty like a smoothing spline. The smoothness penalty solves the problem of arbitrary (poor) knot selection in many cases. General least squares splines are covered in depth in the literature, as are smoothing splines. For these fundamental ideas, de Boor is of course the classic reference, a book worth reading for any user of splines. What the SLM tools add though is something that I've never really seen written about in the literature. This is the idea that intelligently chosen constraints on the curve shape can act as a strong, useful regularizer on your result. They allow you to build your own knowledge about a system into the model, using a simple vocabulary to describe the desired shape of that curve. I wrote these tools after some years of seeing people using strange nonlinear regression models to fit curves, just because they needed a curve with a given shape. So the user picks some nonlinear sigmoidal form, a Gaussian, etc., for no better reason than that it fits some fundamental desired shape. And of course, nonlinear regression has its own problems, like poor starting values, lack of convergence, etc. Worse, the user finds that the curve shape they chose is not really the correct shape, so they end up with significant lack of fit. Once a viable tool becomes available to fit those curves, I find that far fewer people end up using nonlinear regression models for the wrong reasons. There are a couple of files that discuss some of these ideas "slm_tutorial.html" and "shape prescriptive modeling.rtf" in the zip file, but that is all I can offer. We also suggested a citation format for tools from the file exchange, if you do need an explicit reference. You can find our recommendations here: http://matlabwiki.mathworks.com/Citing_Files_from_the_File_Exchange |
|
| 30 Jul 2010 | pa-wavplay Play and record multi-channel audio using either an ASIO, DirectSound, or Windows multimedia audio d | Gauthier, Philippe-Aubert | Following my previous comment, here is my recent advice. On win64 bits, I have not been able to run pa_wavplay in Matlab 64 bits. Using Matlab 32 bits in Win 7 64 bits, I have been able to run pa_wavplay without any problem with a 96-channel system made from MOTU sound cards. |
|
| 30 Jul 2010 | Wind_rose Wind rose of direction and intensity | LEE, YJ | % Input data SHOULD be meteological wind data coming from
|
|
| 30 Jul 2010 | SLM - Shape Language Modeling Least squares spline modeling using shape primitives | Avital, Royi | Is there any article which could be used as reference to this kind of fitting?
Thanks for this amazing tool. |
|
| 30 Jul 2010 | Wavefront OBJ toolbox Read and Write Wavefront OBJ geometry and MTL files | wan, Jun | it's great work! thanks |
|
| 30 Jul 2010 | ICP variants An implementation of various ICP (iterative closest point) features. | H, Michael | Looks very good, but I can't get icp.m to run as I think it is missing the rms_error function. Am I doing something wrong? |
|
| 30 Jul 2010 | Simulink Signal Viewing using Event Listeners and a MATLAB UI. This demo shows how to use block listeners to view model signals in a MATLAB user interface. | z, zanna | what about "the old metod" s function?? |
|
| 30 Jul 2010 | Surface Fitting using gridfit Model 2-d surfaces from scattered data | Chapman, Adam | the new setting "'smoothness',[xsmooth ysmooth]" is a Godsend. Many Thanks |
|
| 30 Jul 2010 | uneven Display unevenly distributed data in 2-D and 3-D as ordinary colour-coded, regularly spaced data. | Guillaume | Hi, do you have some simple example about how to use it ? |
|
| 30 Jul 2010 | OpenSURF SURF (Speeded Up Robust Features) image feature point detection / matching, as in SIFT | Kroon, Dirk-Jan | *Peter
|
|
| 30 Jul 2010 | rilt Regularized Inverse Laplace Transform | H, L | The program is great and lets the user to avoid the trouble of dealing with the original Fortran CONTIN program. The program works great, although I have just a couple comments:
That said, I want to say thank-you to the programmer. This routine has helped me out with an aspect of my thesis. |
|
| 29 Jul 2010 | TRUTH TABLE Creates a Logical Truth Table Matrix for 'N' Input Variables. | Jamleh, Hani | ||
| 29 Jul 2010 | Theme from Super Mario Brothers Song plays the Super Mario Brothers theme song. | Robert | ||
| 29 Jul 2010 | Inpaint over missing data in N-D arrays Y = INPAINTN(X) replaces the missing data in X by extra/interpolating the non-missing elements. | Leonardo | Very useful, works nicely. The only issue is that a couple of additional functions (dctn and idctn) have to be downloaded from another site for this to work |
|
| 29 Jul 2010 | OpenSURF SURF (Speeded Up Robust Features) image feature point detection / matching, as in SIFT | Peter | Hello, Toolbox looks nice, but feats = openSurf(randn(49,285)); errors: ??? Index exceeds matrix dimensions. Error in ==> FastHessian_isExtremum>FastHessian_getResponse at 44
Error in ==> FastHessian_isExtremum at 25
Any ideas? |
|
| 29 Jul 2010 | Demonstration of Astar (A*) Pathfinding algorithm Astar (A*) | Graven, TheCount | I was playing with the code and I think that the g part of the Astar equation (f=g+h) is missing. I inputted my own state space for the algorithm to traverse and it went 7 spaces more than it needed to to reach its goal. I added a crude form of g and it found the optimal path I was looking for in my example. Other than that I like this GUI it looks really nice. |
|
| 29 Jul 2010 | 3D Polar Plot Plots 3D polar data with axes. | Knight, BD | Cool. How can I set meshscale independently for rho and theta? |
|
| 29 Jul 2010 | Simulink LED Make a status display of signal in Simulink. | Dillon, Martin | Awesome, this is exactly what I was looking for. Thanks! |
|
| 29 Jul 2010 | OpenSURF SURF (Speeded Up Robust Features) image feature point detection / matching, as in SIFT | Kroon, Dirk-Jan | *Petter
(Tomorrow a new version wil be online were I fixed a small bug in the image display function) |
|
| 29 Jul 2010 | estimateRigidTransform estimate the rigid transformation between two sets of 3D point clouds, given a set of point matches | Taati, Babak | Thanks Janti. You're correct. I fixed it. |
|
| 29 Jul 2010 | Maximum Drawdown Maximum relative drawdown of time-series data | Licona, Andres | If you are really interested in the downside risk Steiner's version is the best. Then you have more insight about the tail. This is very important when looking at regimes. |
|
| 29 Jul 2010 | Cornish-Fisher VaR Returns the Cornish-Fisher Expansion Valut at Risk. (Up to 4th moment) | Licona, Andres | ||
| 29 Jul 2010 | multimodality non-rigid demon algorithm image registration non-rigid 2D and 3D image registration with demon (fluid) algorithm, extended with modality transf. | Lu, Cheng | What a perfect work~~~ I try it and foud that the gradient of the image is calculated as [My,Mx]=gradient(M); But why you want to inverse the x and y? Since normally we use [Mx,My]=gradient(M); Maybe it is related to your 'Movepixels' function? Your implemntation is based on the additive Demons, do you have any idea to add a compositive Demons? How do we calculate the composition of fields in Matlab? Thanks. |
|
| 29 Jul 2010 | ROC curve compute a ROC curve | Oshin, Segun | Hi, the code is very good. However, I encounter an error where the cut-off point is set, on line 186, ??? Attempted to access labels(7397); index out of bounds because numel(labels)=7396. Error in ==> roc at 186
Is there a way to fix this?
|
|
| 29 Jul 2010 | ROC curve compute a ROC curve | Oshin, Segun | ||
Contact us at files@mathworks.com