I was doing this script, in which I should have 72 answers (24 answers with each value of d), but I only have 24 value, hence, my script is only considering one of my values of d. Also, in line 32 it says the dash is incorrect, please help me with that. The script is as follows:
phi = 53;d = 100:100:365;for i = 1:1:length(d) delta(i) = -23.45 * cosd((360/365) * (d(i)+10));endh = 1/24:1/24:1;for i = 1:1:length(d) for j = 1:1:length(h) h_a(j) = 360 * (h(j)-0.5); alpha(j) = asind(((sind(phi) * sind(delta(i))) + (cosd(phi) * cosd(delta(i)) * cosd(h_a(j))))); theta(j) = 90 - alpha(j); end if h <= 0.5 beta(j) = -acosd((((sind(delta(i)) * cosd(phi)) - (cosd(h_a(j)) * cosd(delta(i)) * sind(phi)))/sind(theta))); else beta(j) = acosd((((sind(delta(i)) * cosd(phi)) - (cosd(h_a(j)) * cosd(delta(i)) * sind(phi))))/sind(theta)); endend
Best Answer