Rice University logo
 
Top blue bar image
 

Archive for April, 2011


Suggests for writing a MATLAB software package

April 2nd, 2011 by wy1

I recently compared TVAL3 and TwIST, and I found several great things about TwIST that make it easier than TVAL3 to apply to my specific application, which has unique sensing operator, data dimension, and TV implements. I merely changed two lines of their main solver algorithm, in addition to writing my own sensing operator and TV-related operations. I am very happy with this experience. We post algorithms online to let people read it, use it, and perhaps improve it. Below, let me summarize a few points that I noticed to have saved my time or would save more.

  1. The main algorithm treats all data as 1D vector, regardless the actual dimension of the user’s data. See below why this is possible. The benefit is that the user won’t need to modify the main algorithm and thus to understand it first.
  2. Implement sensing operators, objective value calculation, shrinkage operations, etc. in separate m-files. Pass them to the main algorithm as function handles. This modularized design allows the user to easily swap in their own implementations.
  3. For point 2, the User’s Manual shall specify the interfaces of various modules. In addition, demos will help.
  4. If an algorithm permits parameter input, a help similar to MATLAB help pages is a good thing to have. The set of parameters can be organized in a table with their defaults, min/max values, and explanations.
  5. (more to come)