TASK: Evaluate a formula estimating the weight of children.
COMMENT: The Theron formula estimates KG, the weight in kilograms of a child of age N years, as
kg = e( 0.175571 * n + 2.197099 )We would like to compute this quantity, and convert it to pounds.
INSTRUCTIONS:
Use MATLAB's input() statement to request a value for "n", the child's age. n = ?; Use MATLAB's exp() function to evaluate the formula for kg. kg = ?; Find out how to convert a weight in kilograms to a weight in pounds, and compute the equivalent weight as "lb": lb = ?; Print the values of n, kg, and lb: fprintf ( ' Age: %d, weight estimate %g kg or %g pounds.\n', n, kg, lb );
SUBMIT: Your work should be stored in a script file called "hw004.m". Your script file should begin with at least three comment lines:
% hw004.m % YOUR NAME % This script (describe what it does) % Add any comments here that you care to make.If this problem is part of an assignment, then submit it to Canvas.