The Wind Chill Factor (WCF) measures how cold it feels with a given air temperature T (in degrees Fahrenheit) and wind speed V (in miles per hour). One formula for WCF is
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:5| Question number:37.5
All Answers
total answers (1)
Ch5Ex37.m
% Print table of wind chill factors
% Print column headers
fprintf('%45s\n ', 'Wind Speeds')
for v = 0:5:55
fprintf('%7d', v)
end
fprintf('\nTemp\n')
for t = -20:5:55
fprintf('%3d', t)
for v = 0:5:55
fprintf('%7.1f',wcf(t,v))
end
fprintf('\n')
end
wcf.m
function outwc = wcf(t, v)
% Calculates the wind chill factor
% Format of call: wcf(temperature, wind speed)
% Returns 35.74 + 0.6215T - 35.75(V^0.16) + 0.4275T(V^0.16)
outwc = 35.74 + 0.6215 .* t - 35.75 .* (v.^0.16) + ...
0.4275 .* t .* (v.^0.16);
end
need an explanation for this answer? contact us directly to get an explanation for this answer