In: Electrical Engineering
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 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 THANKYOU
(a)
prompt_temp = 'Enter Temperature '; T = input(prompt_temp);
prompt_velocity = 'Enter Wind Velocity'; W = input(prompt_velocity);
wind_chill_output = wind_chill(T,V) function wind_chill_output = wind_chill(T,V)
wind_chill_output=round(35.74+0.6215*T-35.75*V^0.16+0.4275*T*V^0.16);
end disp(wind_chill_output);
(b)
T=(40:-5:-45);
V=(5:5:60);
for i=1:length(V)
for j=1:length(T)
W(i,j)=round(35.74+0.6215*T(j)-35.75*V(i)^0.16+0.4275*T(j)*V(i)^0.16);
end
end
disp(W);