Create a function that calculates the incident angle of the

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.

Solution

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

 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

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site