Search Comments and Ratings

go

Comments and Ratings

   
Date File Comment by Comment Rating
30 Mar 2009 Converting between text strings and binary vectors Functions to convert from text strings to binary vectors and back again. Author: Rick Rosson Vishaka

You have introduced a lot of unnecessary conversions in your code for converting from string to vector:
This line suffices for doing the conversion:
binVec = uint8(binStr) - uint8('0');
If you want a double vector, you can just do a double(binVec).

16 May 2008 RGB Image Decomposition Displays RGB decomposition of a full color image Author: Rick Rosson jamil, mohsan

11 Apr 2008 Converting between text strings and binary vectors Functions to convert from text strings to binary vectors and back again. Author: Rick Rosson kh, Mohammad

09 Apr 2008 RGB Image Decomposition Displays RGB decomposition of a full color image Author: Rick Rosson yuan, chen

mini program

15 Jan 2008 Body-Mass Index Computes body-mass index and plots bmi versus weight Author: Rick Rosson D'Errico, John

I'll admit I'm not entirely sure what purpose this serves as a Matlab utility. Since it seems to be of mainly educational value, why not add some links to more information about BMI? Perhaps these are a start:

http://www.cdc.gov/nccdphp/dnpa/bmi/

http://www.cardiometabolic-risk.org/

While I won't get into the questions of whether BMI is an accurate indicator of health, nor will I get into the issue of mono-numerosis, BMI surely is one indicator of health. So the author might have added some indication of what a reasonable BMI should be. Otherwise, its just a random number. The plot might have been done so that the line varies in color, scaled so that good BMI numbers would be green, turning to red at the high end.

The help itself for bmi.m is good. Its readable and concise, defining the inputs and outputs. I'm not terribly sure why the units on the inputs are in pounds and inches, yet the returned BMI has SI units. Tradition?

I found an H1 line, but no error checking on the arguments. OTOH, the arguments are pretty simple, so I'll excuse that lack. The code is pretty simple, so nothing to go wrong, and I did find internal comments before many lines.

Now, if I can only figure out how to be nine feet tall, I'll have a perfect BMI myself. ;-)

07 Jan 2008 RGB Image Decomposition Displays RGB decomposition of a full color image Author: Rick Rosson alrosid, harun

28 Dec 2007 RGB Image Decomposition Displays RGB decomposition of a full color image Author: Rick Rosson Hollmann, Joseph

Rick,
this code can be easily rewritten to get rid of the imageprocessing toolbox dependency.

Also, I am pretty sure you want to take the following line out of your for-loop.
C = zeros(N,3);

Without the appropriate comments, it is difficult to tell but why use the line below line?
gr = gr(:,1);

 

MATLAB Central Terms of Use

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