Please solve question two using Matlab. Please provide a screenshot of how you g
ID: 3864991 • Letter: P
Question
Please solve question two using Matlab. Please provide a screenshot of how you got the solution and please take a screenshot of the results.
2. In your first job, you are asked to design a universal converter using Matlab that converts US system to international standard (IS) system. The converter converts length (L), volume (V) and temperature (T). The conversation table is given below. Design your converter that will ask the user to choose the direction of conversion and the type of conversion to be performed by choosing the appropriate number from the list provided, see the following figures. Then ask the user to enter the amount to be converted, and then display the result in IS unit or US unit. Use SWITCH/CASE to design the converter. IS 1 mile 1.609 km 29.57 ml 1 fl oz (fluid ounce) F Fahrenheit (F-32)x5 Celsius This is how your rogram should look when asking the user to choose the conversionExplanation / Answer
disp("1. SI to US conversation");
disp("2. US to SI conversation");
n = input("Enter choice: (1 or 2) ");
switch (n)
case 1
disp("1. Kilometer to mile conversation");
disp("2. mili-liter to fluid ounce conversation");
disp("3. Celcius to Ferenheit conversation");
m = input("Enter your choice of conversation (1, 2, or 3) ");
val = input("Enter value: ");
switch (m)
case 1
val = val / 1.609;
case 2
val = val / 29.57;
case 3
val = val / 5 * 9 + 32;
end
case 2
disp("1. Mile to kilometer conversation");
disp("2. fluid ounce to mili-liter conversation");
disp("3. Ferenheit to Celcius conversation");
m = input("Enter your choice of conversation (1, 2, or 3) ");
val = input("Enter value: ");
switch (m)
case 1
val = val * 1.609;
case 2
val = val * 29.57;
case 3
val = (val-32) * 5 / 9;
end
end
fprintf("Converted value is %d ",val);