Question: Write a function convertF(F) that accepts temperature in degrees F and computers the corresponding value in degrees C. The relationship between the two is given
Write a function convertF(F) that accepts temperature in degrees F and computers the corresponding value in degrees C. The relationship between the two is given as: T_c = 5/9(T_F - 32) Be sure to add appropriate comments (i.e. what the function does, what are the inputs, outputs and local variables) for use with help, and test your function. Submit only your function m-file for this problem. Write a function DistVelocity(y_0 a, t) that calculates the distance and velocity of a car undergoing constant acceleration at a time t. The equations; v = v_0 + a t x = v_0t +_1/2 a t^2 where v_0 is initial velocity, v is final velocity, s is distance travelled a is the rate of constant acceleration, and t is time (in seconds). The function should contain enough comments (i.e. what the function does, what are the inputs, outputs and local variables) to be adequately explained in the help file. The function should output both velocity and distance (v and s). Submit only your function m-file for this problem. Make function called loopTest(N) that loops through the values 1 through N and for each number n it should display n' is divisible by 2', 'n is divisible by 3', 'n is divisible by 5' or n is not divisible by 2, 3 or 5'. Use a for loop, the function mod() or rem() to figure out if a number is divisible by 2, 3 or 5.. You can use any combination of if, else, and elseif. The function should contain enough comments (i.e. what the function does, what are the inputs, outputs and local variables) to be adequately explained in the help file. Submit only your function m-file for this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
