6th EditionCharles Alexander, Matthew Sadiku2,102 explanations

14th EditionR.C. Hibbeler1,447 explanations

2nd EditionAlan S. Willsky, Alan V. Oppenheim, S. Hamid665 explanations

10th EditionR.C. Hibbeler1,670 explanations

ENGINEERINGThe average daily temperature for an area can be approximated by the following function:
$$
T=T_{\text {mean }}+\left(T_{\text {peak }}-T_{\text {mean }}\right) \cos \left(\omega\left(t-t_{\text {peak }}\right)\right)
$$
where $T_{\text {mean }}$ = the average annual temperature, $T_{\text {peak }}$ = the peak temperature, $\omega$ = the frequency of the annual variation $(=2 \pi / 365)$, and $t_{\text {peak }}$ = day of the peak temperature $(\cong 205 \mathrm{d})$. Parameters for some U.S. towns are listed here:
$$
\begin{matrix}\text{City} & \mathrm{\text{T}_{\mathrm{mean}} (^{\circ} \mathrm C)} & \mathrm{\text{T}_{\mathrm{peak}} (^{\circ} \mathrm C)}\\\text{Miami, FL} & \text{22.1} & \text{28.3}\\\text{Yuma, AZ} & \text{23.1} & \text{33.6}\\\text{Bismarck, ND} & \text{5.2} & \text{22.1}\\\text{Seattle, WA} & \text{10.6} & \text{17.6}\\\text{Boston, MA} & \text{10.7} & \text{22.9}\\\end{matrix}
$$
Develop an M-file that computes the average temperature between two days of the year for a particular city. Test it for (a) January–February in Yuma, AZ (t = 0 to 59) and (b) July-August temperature in Seattle, WA (t = 180 to 242).