Question: Can you write the script for b)? Thanks 2. (a) The wind chill factor (WCF) measures how cold it feels with a given air temperature
2. (a) 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: WCF=35.7+0.6T-35.7(10.16)+0.437(10.16) A student has written the following script and function to calculate the wind chill factor, but has included several mistakes: DEGF=0; while DEGF---100 DEGF=input('Enter T in Fahrenheit (or -100 to exit) :'); V=input (Enter wind speed in mph: ); WCF-calcWindchill (DEGE, v); disp (wcf) end function (WCF ] = CalcWindchill( v, degf) wcf-35.7+(0.6 T) -35.7* (v^0.16) +0.43*T* (v^0.16); end Rewrite the code, correcting the mistakes. (b) Write a MATLAB function that will save each calculated wind chill factor correct to two decimal places to a file named 'log.txt' instead of displaying it on the screen. Explain how one can use content addressing to create a cell array and why cell arrays are useful in MATLAB
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
