Date  File  Comment by  Comment  Rating 

07 Sep 2011  Don't let that INV go past your eyes; to solve that system, FACTORIZE! A simpletouse objectoriented method for solving linear systems and leastsquares problems.  Tim Davis  Comment from the author: I have addressed Ben's comment about uminus in this update (Sept 2011). You can now do inverse(A)*b, or 2*inverse(A)*b, which you could not do in the previous version. 

22 Mar 2010  Don't let that INV go past your eyes; to solve that system, FACTORIZE! A simpletouse objectoriented method for solving linear systems and leastsquares problems.  Tim Davis  inverse(A)*b can also be done as (inverse(A)*b), which is more natural than inverse(A)*(b). 

12 Mar 2010  VIDEO TUTORIAL: Serial communication (TX and RX) using SERIAL Matlab function. VIDEO TUTORIAL: Serial communication (TX and RX) using SERIAL Matlab function.(Narration in Spanish)  Tim Davis  Minor comment: the downloaded filename includes nonascii characters. This causes the MATLAB "unzip" function to fail. A video in Spanish is fine (there should be more), but I suggest that you change the filename so that MATLAB can handle the file properly. 

12 Mar 2010  Tamperproof digital files An example of a selfembedding scenario  Tim Davis  "wanna" is not grammatically correct, and is not a good example for secondary students. 

12 Mar 2010  Complement Coding Complement Coding can be used to preprocess and normalize neural network input.  Tim Davis  The "unzip" function in MATLAB cannot handle this file. It returns an error: warning: ERROR: Error using ==> extractArchive>copyStreams at 174
I was able to unzip it on my Mac, via the Unix "unzip" command. The MATLAB "unzip" fails. Also, the zip file contains yet another copy of itself (complement.zip). That file includes still another copy of the code. Please rezip the file and repost it. You should exclude the nested zip file. 

12 Mar 2010  Don't let that INV go past your eyes; to solve that system, FACTORIZE! A simpletouse objectoriented method for solving linear systems and leastsquares problems.  Tim Davis  Comment from the author: implementing the uminus function would be rather painful. I would need to return an object that is unchanged from the previous one, except with a flag stating that the result of all other functions must negate their result. This would be rather ugly and would needlessly complicate the code, just to add a rather minor feature. Thanks for the suggestion ... I agree that uminus "ought" to work. It seems simple from the perspective of an enduser. But implementing it is far more trouble than it's worth, in my opinion. 

12 Mar 2010  getversion Portable replacement for verLessThan on old MATLAB releases  Tim Davis  Comment from the author: Note that for MATLAB 7.10 (R2010a), this function returns "8". Version 7.10 follows after 7.9, but version 7.10 is not the same as 8.0. When I wrote this code, I assumed that the subversion number (the "y" in "x.y") would always be a single decimal digit. getversion still returns a value that is monotonically increasing for all MATLAB versions, including 7.10. However, it will fail when MATLAB 8.0 actually comes out. One fix would be to return a value equal to version+subversion/100, so that "7.1" becomes the number 7.01, "7.10" becomes the number 7.1, and "8.0" would then be 8.0. But this fix would look strange. Printing the version number would lead to confusion. Maybe I should switch to hexadecimal ... 

12 Mar 2010  Patch for XTargets MUnit Patch for later versions of MATLAB  Tim Davis  The zip file is corrupted. I can unzip it using the system "unzip" command on my Mac and on my Linux PC, but the MATLAB "unzip" function in MATLAB on both those platforms fails, reporting an invalid zip file. Please rezip the file and repost. 

25 Jun 2009  SmartInv Large sparse matrix inversion. Returns block diagonal, tridiagonal or pentadiagonal elements.  Tim Davis  There's still something wrong with this submission. I computed the exact inverse of this matrix: http://www.cise.ufl.edu/research/sparse/matrices/HB/bcsstk28.html and then extracted the tridiagonal entries of the inversion (entries on the diagonal, subdiagonal, and +1 diagonal). I then computed S = smartinv(A,1,'tri'), excepting to get the same thing. But I don't I get a matrix with zeros on the +1 and 1 diagonals, every 15 entries or so. So this revised submission is still not computing what it says it computes. 

24 Jun 2009  SmartInv Large sparse matrix inversion. Returns block diagonal, tridiagonal or pentadiagonal elements.  Tim Davis  This function attempts to do the right thing when computing selected entries of the inverse, by solving a sequence of linear equations after doing an LU factorization. However, the implementation is flawed. One suggestion: the statement [L,U,P]=lu(A) does not allow LU to permute A to improve sparsity. It would be better to use the 4output LU, [L,U,P,Q]=lu(A), except in your case you'd need to use another name for Q since you have a Q variable already. You would then need to use the column permutation Q in the forward/backsolve steps. Including a "waitbar" in a function like this is not a good idea. There seems to be a bug. The documentation says that s=smartinv(A) returns the diagonal of the inverse, but in fact I get the whole inverse back. If I do s=smartinv(A,1), I get a diagonal matrix, but not the diagonal entries of the inverse, which is what the documentatioon said I would get. (I tried with this matrix, which is included in MATLAB): load west0479
With smartinv(A,1) or smartinv(A,1,'mono'), I should get the diagonal of inv(A) as the result, but I don't. SOmething else is returned. Finally, the method is very slow. Computing the entire inverse takes 0.13 seconds using S=inv(A). Using S=smartinv(A) I get the same result, but it takes 15 seconds. In the profiler, all the time is spent in this one line of code: Q(q0+1:q0+w,q0+1:q0+w) = insblock; that's a very bad idea. You should never use sparse submatrix assignment, if at all possible. A better approach is to build the matrix all at once, from the blocks, using the "sparse" command. So there appears to be at least three serious bugs in the code:
And 2 serious drawbacks:


11 Dec 2008  fpermute Derives a matrix of all possible permutations of natural numbers 1, 2, ... , N for a given N  Tim Davis  A few suggestions. First and foremost, this code needs commenting. You have to look at the output matrix to figure out what matrix it's computing. This code has no comments at all. That's really the main reason I give it a rating of 3. The second reason is that it needs to be redesigned. Wouldn't it make more sense to provide a function that returns each of the n! permutations one at a time? The matrix itself is huge. fpermute(10) returns a (10!)by10 matrix, about 3.6 million by 10. Surely an application doesn't need all 3.6 million permutations at the same time. Something like: k = 1
which increments k. k=1 gives the first one (p=1:n), k=2 the next one, etc. That would be a useful function. This one is limited by memory requirement to small values of n. 

10 Dec 2008  Vandermonde matrix Creating matrix with terms of geometric progression in each row  Tim Davis  You should clarify in your help information that the matrix produced has its columns listed in the opposite order of the vander.m function in MATLAB. Also, providing the determinant is nice, but it would be better to return the log or log10 of the determinant. That way, you can deal with determinants that are very large and very small (it's quite easy for det(A) to underflow or overflow). Otherwise, nice work, and nicely commented. (You should have a "see also vander" line, though). Nice use of cumprod. I'm surpised that this function is slower than vander, though. 

10 Dec 2008  compare text It comapares two diferent words, and the resilts is 1 or 0. That's it  Tim Davis  Sometimes a duplicate of an existing MATLAB function is useful, if it illustrates an algorithm for educational use, for example. This is particularly true for builtin functions like strcmp. However, this function is so simple (and poorly commented even if you can read the language it's in), that it really serves no purpose at all. It doesn't illustrate anything useful, has fewer features than strcmp, and is slower as well. So why bother? I suggest that the author remove the file. It's really not any help, since it might mean that a MATLAB user would miss the real function (strcmp) and use this one instead. 

31 Oct 2008  ftoc (v1.2) Creates a table of contents of functions contained in an mfile  Tim Davis  
31 Oct 2008  ISLANDS Finds all "islands" which are 4connected components in a matrix.  Tim Davis  Nice work! 
