Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a function that calculates the incident angle of the sun\'s rays at solar

ID: 2319824 • Letter: C

Question

Create a function that calculates the incident angle of the sun's rays at solar noon (the highest point of the sun in the sky) given a certain latitude and a certain day of the year. The incident angle depends on two things. The first is the declination angle, which is the angle of incidence of the sun at the equator. For a given day, the equation for declination angle is: delta = 23.45 sin(2 pi 284 + day/362.5) Where the day is an integer from 1 to 365, where 1 is January 1^st and 365 is December 31^st. that the argument of the sine function is in radians, but the declination angle (delta) we get is in degrees. Once we know the declination angle, the magnitude of the incident angle (theta_i) is given as: cos theta_i = cos delta cos latitude + sin delta sin latitude Where delta and latitude are in degrees. Note that theta_i is negative when latitude - delta > 0 and positive otherwise. An angle of 0 means that the sun's rays are perpendicular to the ground. A negative angle means the rays are angled towards the north, and a positive value means that the sun's rays are angled towards the south. A magnitude of more than 90 degrees means that that latitude receives no sunlight on that day! Remember: 1^st input is latitude, 2^nd input is day Useful hints: There are different commands for sinusoid functions depending on whether the input is in radians (sin) or degrees (sind). Be careful to use the correct ones for this program.

Explanation / Answer

Matlab Code:

function incangle = inclination_angle(day,latitude)
decangle = 23.45*sin(2*pi*((284+day)/362.5));%implementing declination angle
incangle = acosd((cosd(decangle)*cosd(latitude))+(sind(decangle)*sind(latitude)));%implementing inclination angle
end

Output:

>> incangle = inclination_angle(344,85)

incangle =

108.3070

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote