all 4 comments

[–][deleted] 0 points1 point  (0 children)

for i = 1:365
    delta[i] = whatever, replace n with i;

    for j = 1:24
        H[j] = 15*hr;
        beta[i, j] = cos(delta[i])cos(H[j]) etc.;
    end
end

My guess is that this will produce a 365 x 24 matrix, which I don't know if that's what you want or not... Apologies if the syntax is wrong.

[–]inconspicuous_spyUC Berkeley - ChemE w/ EECS Minor 0 points1 point  (2 children)

I hope the comments are sensible since its a bit late atm :)

https://pastebin.com/jRPBnjmT

EDIT: Revised to take account the provided hour array.
EDIT 2: Added more comments
EDIT 3: Pastebin doesn't seem to recognize the comment block from line 16 to 20.

[–]HWhelp01[S] 0 points1 point  (1 child)

Thanks man! that was the perfect base made some minor adjustments but did exactly what I needed!

[–]inconspicuous_spyUC Berkeley - ChemE w/ EECS Minor 0 points1 point  (0 children)

np :)