Problem 4.21 from Matlab: A Practical Introduction to Programming and Problem Solving. Attaway

14 vues (au cours des 30 derniers jours)
I am supposed to write a function to receive the temperature and wind speed as input arguments, and return the wind chill factor. Using loops, I need to print a table showing wind chill factors for temperatures ranging from -25 to 55 in steps of 5, and wind speeds ranging from 0 to 55 in steps of 5. Last of all I need to call the function to calculate each wind speed.
I am given the function for the wind chill factor as: 35.7 + 0.6 T - 35.7(V^0.16) + 0.43T(V^0.16) where T is the temperature and V is the velocity of the wind.
  1 commentaire
Alex
Alex le 15 Fév 2012
We aren't here to solve your homework for you. We are here to help you when you have problems. Please follow the following: http://www.mathworks.com/matlabcentral/answers/7885-tutorial-how-to-format-your-question to get an idea how to format questions. We also would like to know what you have tried.

Connectez-vous pour commenter.

Réponses (1)

Sean de Wolski
Sean de Wolski le 15 Fév 2012
windchill = @(T,V)bsxfun(@(T,V)35.7+0.6*T-35.7*(V.^0.16)+0.43*T*(V.^0.16),T(:),V(:)'); %function to get windchill factor
wcf = windchill(-25:5:55,0:5:55); %called with desired inputs

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by