I am trying create a plot(angle of incidence vs. time). Time is set between hour of sunrise to hour of sunrise (6:37:00 AM - 6:39:00 PM). I have to find angle of incidence for each minute interval starting from sunrise to sunset. The only issue is I don't have the faintest clue how to convert time into a number.
Angle of incidence depends on hour angle (Angle_hour). This is dependent on the time. Time before noon is given a negative value, and time after noon is positive. For example, at 6:37 am, the Hours would equal -6.62. On the other hand, 6:39 PM would equal 6.65. I am trying to have a for loop calculate the different values within the time frame.
for k = 1:6
Hours = k;
Angle_Hour(k) = 15 * Hours;
Angle_Incidence(k) = acos((sin(Angle_Declination) * sin (Angle_Latitude) * cos(Angle_Slope)) - (sin(Angle_Declination) * cos(Angle_Latitude) * sin(Angle_Slope) * cos(Angle_SurfaceAzimuth)) + (cos(Angle_Declination) * cos(Angle_Latitude) * cos(Angle_Slope) * cos(Angle_Hour(k))) + (cos(Angle_Declination) * sin(Angle_Latitude) * sin(Angle_Slope) * cos(Angle_SurfaceAzimuth) * cos(Angle_Hour(k))) + (cos(Angle_Declination) * sin(Angle_Slope) * sin(Angle_SurfaceAzimuth) * sin(Angle_Hour(k)))) ;
end