Question

In: Electrical Engineering

Part 1. MATLAB Programming The wind chill factor measures how cold it feels with a given...

Part 1. MATLAB Programming The wind chill factor measures how cold it feels with a given air temperature T (in degrees Fahrenheit) and wind speed (V, in miles per hour). The formula is approximately
WCF = 35.7 + 0.6T ? 35.7(V0.16) + 0.43T(V0.16)
a). Write a function that will calculate the wind chill factor (WCF) given temperature and wind speed. Your function should round down to the nearest integer.
b). Write a script that will use the function above to create a table of wind chill factors, similar to the one shown at https://en.wikipedia.org/wiki/Wind_chill#/media/File:Wind_chill.png. Wind speed should be down the left and temperature across the top.

Please show output if possible Thanks

Solutions

Expert Solution

Code For Wind_Chill_Factor.m

%------------------------------------------

function [ Tw ] = Wind_Chill_Factor( Ta,v)
%UNTITLED8 Summary of this function goes here
% Detailed explanation goes here
Tw = round(35.74 + 0.6215*Ta - 35.75*v^0.16 + 0.4275*Ta*v^0.16);

end

%--------------------------------------------------

Code for main.m

%---------------------------------------------------------

clc;clear;
Ta = input('Enter the Temperature = ');
v = input('\nEnter the Wind Velocity = ');
Tw = Wind_Chill_Factor( Ta,v);
sprintf('Wind Chill Factor Tw = %f',Tw)
%%
v = 5:5:60;
t = flip(-45:5:40);
T = ones(length(v)+1,length(t)+1);
T(1,1) = NaN;
% T(1,j) = t(j-1);
% T(i,1) = v(i-1);

for i = 2:(length(v)+1)
T(i,1) = v(i-1);
for j = 2:(length(t)+1)
T(1,j) = t(j-1);
T(i,j) = Wind_Chill_Factor( t(j-1),v(i-1));
end
end

T

-------------------------------------------------------------

Sample Output:

------------------------------------------------

Enter the Temperature = 50

Enter the Wind Velocity = 20

ans =

Wind Chill Factor Tw = 44


T =

NaN 40 35 30 25 20 15 10 5 0 -5 -10 -15 -20 -25 -30 -35 -40 -45
5 36 31 25 19 13 7 1 -5 -11 -16 -22 -28 -34 -40 -46 -52 -57 -63
10 34 27 21 15 9 3 -4 -10 -16 -22 -28 -35 -41 -47 -53 -59 -66 -72
15 32 25 19 13 6 0 -7 -13 -19 -26 -32 -39 -45 -51 -58 -64 -71 -77
20 30 24 17 11 4 -2 -9 -15 -22 -29 -35 -42 -48 -55 -61 -68 -74 -81
25 29 23 16 9 3 -4 -11 -17 -24 -31 -37 -44 -51 -58 -64 -71 -78 -84
30 28 22 15 8 1 -5 -12 -19 -26 -33 -39 -46 -53 -60 -67 -73 -80 -87
35 28 21 14 7 0 -7 -14 -21 -27 -34 -41 -48 -55 -62 -69 -76 -82 -89
40 27 20 13 6 -1 -8 -15 -22 -29 -36 -43 -50 -57 -64 -71 -78 -84 -91
45 26 19 12 5 -2 -9 -16 -23 -30 -37 -44 -51 -58 -65 -72 -79 -86 -93
50 26 19 12 4 -3 -10 -17 -24 -31 -38 -45 -52 -60 -67 -74 -81 -88 -95
55 25 18 11 4 -3 -11 -18 -25 -32 -39 -46 -54 -61 -68 -75 -82 -89 -97
60 25 17 10 3 -4 -11 -19 -26 -33 -40 -48 -55 -62 -69 -76 -84 -91 -98

>>

----------------------------------------------------------------------------

Dont Forget to Hit Like....


Related Solutions

Part 1. MATLAB Programming The wind chill factor measures how cold it feels with a given...
Part 1. MATLAB Programming The wind chill factor measures how cold it feels with a given air temperature T (in degrees Fahrenheit) and wind speed (V, in miles per hour). The formula is approximately ?????? = 35.7 + 0.6?? ? 35.7(??0.16) + 0.43??(??0.16) a). Write a function that will calculate the wind chill factor (WCF) given temperature and wind speed. Your function should round down to the nearest integer. b). Write a script that will use the function above to...
The wind chill factor depends on wind speed and air temp. This data represents the wind...
The wind chill factor depends on wind speed and air temp. This data represents the wind speed (in miles per hour) and wind chill factor at an air temp. of 15 degrees F. Wind speed(x) 5, 10, 15, 20, 25, 30, 35 Wind chill(y) 12, -3, -11, -17, -22, -25, -27 Compute the least squares regression line and correlation coefficient for this data. Predict the wind chill for a wind speed of 50 miles per hour. Determine the wind speed...
C Programming- How would the whole part 1 be coded with multiple loops? Part 1: You...
C Programming- How would the whole part 1 be coded with multiple loops? Part 1: You can do A, B, and C in one program with multiple loops (not nested) or each one in a small program, it doesn’t matter. A. Create a loop that will output all the positive multiples of 9 that are less than 99. 9 18 27 36 45        …. B. Create a loop that will output all the positive numbers less than 200 that are...
Given the conversion factor that 7.3 kcals are required to produce 1 mole of ATP. How...
Given the conversion factor that 7.3 kcals are required to produce 1 mole of ATP. How many moles of ATP would be created in the human body with the metabolism of 1 mole of glucose? 32 686 94 73
1) what is the part of the accounting system that measures costs for the purposes of...
1) what is the part of the accounting system that measures costs for the purposes of management decision making and financtial reporting 2) what is one major factor causing changes in management accounting today?
part 1. An independent measures study has df = 48. How many total participants were in...
part 1. An independent measures study has df = 48. How many total participants were in the study? a. 24 b. 46 c. 50 d. There is not enough information part 2. A commonly cited standard for one-way length (duration) of school bus rides for elementary school children is 30 minutes. A local government office in a rural area conducts a study to determine if elementary schoolers in their district have a longer average one-way commute time. If they determine...
Define beta, what it measures, how to interpret beta, and how beta is used as part...
Define beta, what it measures, how to interpret beta, and how beta is used as part of the capital asset pricing model. Discuss the advantages and disadvantages to using beta. Please show work
Exercise 3 Part 1. Solving a system Ax = b **Create a function in MATLAB that...
Exercise 3 Part 1. Solving a system Ax = b **Create a function in MATLAB that begins with: function [C,N]=solvesys(A) [~,n]=size(A); b=fix(10*rand(n,1)) format long We are using format long to display a number in exponent format with 15 digit mantissas. If later on, you will need to switch back to the default format, type and run format The input is an matrix A. If A is invertible, the outputs are the matrix C, whose 3 columns x1, x2, x3 are...
Part 2: MATLAB Exercise 1 (50 pts) Write a program that tells the user if a...
Part 2: MATLAB Exercise 1 (50 pts) Write a program that tells the user if a city of their choice is in a tropical, temperate, or polar region. Use the cities.txt file provided in the Files section of this class. Your program should read the data in that file, find the city given by the user, and return a text message with the information. If the city is not found, your program should write a message accordingly. To decide which...
Submit your calculation/answer for Part 1 and MATLAB code/result/answer for Part 2 below: Servicing Customers A...
Submit your calculation/answer for Part 1 and MATLAB code/result/answer for Part 2 below: Servicing Customers A supermarket you work part-time at has one express lane open from 5 to 6 PM on weekdays (Monday through Friday). This time of the day is usually the busiest since people tend to stop on their way home from work to buy groceries. The number of items allowed in the express lane is limited to 10 so that the average time to process an...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT