MATLAB: How to create MATLAB functions for the following unit conversions

conversionunits

1. Inches to feet 2. Calories to joules 3. Watts to BTU/hr 4. Meters to miles 5. Miles per hour (mph) to ft/s

Best Answer

For example:
function feet = InchesToFeet(inches)
feet = inches / 12;
Similar concept for the others, just use different multiplication factors.