Q:

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 the WCF follows:

0

 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 the WCF follows:

WCF = 35.7 + 0.6 T – 35.7 (V 0.16) + 0.43 T (V 0.16)

Create a table showing WCFs for temperatures ranging from -20 to 55 

in steps of 5, and wind speeds ranging from 0 to 55 in steps of 5. Write

this to a file wcftable.dat. If you have version R2016a or later, write 

the script as a live script.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Ch9Ex26.m

% Write a table of Wind Chill Factors to a file

%Initialize temperature and wind speed vectors 

T = -20:5:55;

V = 0:5:55;

%Initialize WFC table

table = zeros(length(T)+1,length(V)+1);

table(1,2:end) = V; %Row header of the table

table(2:end,1) = T; %Column header of the table

%Create the WFC table

for i = 1:length(T)

 for j = 1:length(V)

 WCF = 35.7 + 0.6*T(i) - 35.7*(V(j)^0.16) + ...

 0.43*T(i)*(V(j)^0.16);

 table(i+1,j+1) = WCF;

 end

end

%Save resulting matrix to a .dat file

save wcftable.dat table -ascii

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now