I am trying to calculate how much of the sun's energy is collected by the earth every year in a particular location.
I have already calculated how much energy is collected for every daylight hour in one day. To do this, I calculated the zenith angle for the sun at every daylight hour:
w = [80 , 60 , 50 , 30 , 20 , 5]
zenith = acosd((cosd(phi)*cosd(delta)*cosd(w))+(sind(phi)*sind(delta)));
This gives me 6 zenith angles for each angle input. So I have the zenith angles for a day.
I now want to do this for every day of the year.
Each day, the solar declination (delta) changes. I can calculate these values, delta ends up being an array with 365 values.
Because delta and w have different array sizes, I haven't been able to use this function for these two arrays at once and I do not know how to do them separately. Ideally, I would want a matrix with each day's zenith angles on each row of the matrix.
How do I do this?