Question: Element-wise division: Convert pounds to kilograms Assign row array weightKilo with the corresponding weight in kilograms. Use the following conversion: kg = lb / 2.2
Element-wise division: Convert pounds to kilograms Assign row array weightKilo with the corresponding weight in kilograms.
Use the following conversion: kg = lb / 2.2
zyBookS Library ENGR 102 home>5.1: 1D element-wise arithmetic operators Your Function save C Reset MATLAB Documentation function weightkilo - ConvertTokilo(weightPounds) 21% weightPounds: Row array of weights in pounds weightPounds-[100 190 163 211]; weightPounds- % Assign weightkilo with the corresponding weight in kilograms 6 weightkilo - weightPounds./2.2; 8 end Code to call your function C Reset ConvertTokilo([100, 190, 163, 211]) Run Function Assessment: Incorrect Submit Check if ConvertToKilo([100, 190, 163, 211]) returns [45.4545, 86.3636, 74.0909, 95.9091] X Check if ConvertToKilo([20, 25, 30, 35]) returns [9.0909, 11.3636, 13.6364, 15.9091] Function failed for input [20 25 30 35]. Expected: 9.0909 11.3636 13.6364 15.9091]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
