Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program to call a function changing mph into m/s. You need to type in th

ID: 1843152 • Letter: W

Question

Write a program to call a function changing mph into m/s. You need to type in the speed when running the function.(1 mile = 16 km = 1600m) write a program that when you type in five numbers, it will print the number from the smallest one to the largest one.(if you type in 2, 1, 3, 5, 4, the output will be 1, 2, 3, 4, 5) You may need more than one function to complete this mission. Initialize the elements of array S to the even integers from 10 to 40 and calculate the average of the elements. Print out every element smaller than 40 of array A [5, 16, 87, 65 4, 32, 11, 108, 10, 25, 12, 27, 56, 38].

Explanation / Answer

%programming in matlab

problem 1

% Defining a function

function[x_mps]= convert(y_mph)

x_mps= (y_mph*1600)/3600;

% Function definition complete, Now function calling

x= convert(9)

% output

x= 4

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote