Loop for calculating wind chill values
Afficher commentaires plus anciens
I am trying to calculate the Wind Chill factor for many values of Wind speed and Temp.
I want to only use values when TEMP is less than 50 and wind speed is greater than 3.
I also need the result to be a vector so I can plot all the values. Below us my code
Note that I am reading my wind and tempo values from an excel file. Thanks!
for n=1:length(TEMP)
if TEMP<50 && WIND>3
TEMP=dlmread('denver_weather.csv',',',[7,5,0,5]);
WIND=dlmread('denver_weather.csv',',',[7,12,0,12]);
WCF(n)=35.7+0.6.*TEMP-35.7.*(WIND.^(.16))+.43.*(WIND.^(.16))
end
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Mathematics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!