Write a function that will rec

  1. Write a function that will receive two inputarguments that is the height in inches (in.) and the weight inpounds (lb) of a person and return two output arguments that is theheight in meters (m) and mass in kilograms (kg).

  1. Determine in SI units the height and mass of a 5 ft.15 in.person who weight 180 lb.
  2. Determine your own height and weight in SI units.

Note: 1 meter = 39.3701 inch,1 foot = 12 inches, 1 pound = 0.453592 kilogram

Solve this please usingMATLAP

Answer:

Answer:) The code for this function is as follows:

CODE:

%%% Function definitionfunction [ height_m, weight_kg ] = converter( height_in, weight_lb)% This function takes the height in inches and weight in poundsas% inputs, and outputs the height in meters and weight inkilograms   feet = floor(height_in); % get the number of wholefeet   inches = 100*(height_in – feet); % get the number ofinches   height_m = (feet * 12 + inches) / (39.3701); % convertfeet to inches,                                               % and then convert inches                                               % to m   weight_kg = 0.453592 * weight_lb; % use the conversionfrom pounds to kg   disp(“Weight in kg : “)   disp(weight_kg)   disp(“Height in m : “)   disp(height_m)   returnend

The code looks as follows when typed out in MATLAB:

Suppose we give the input height = 5 ft 15 inches, weight = 180lb (given as an input which looks like (5.15, 180) ), we get :

>>converter(5.15, 180)Weight in kg :81.646559999999994Height in m :   1.904998971300556

OUTPUT:

Note: the final ‘ans’ is just the function returning the firstvariable’s value, and is the same as the height_m variable’svalue.

Suppose the user’s weight is 170 lb, and the user’s height is 6ft 10 inches. This would be :

>> converter(6.10, 170)Weight in kg :77.110640000000004Height in m :   2.082798875288606


 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.