can anyone help me for loop
이전 댓글 표시
I have question for example w=15*(ts-12), w start from some value not from 1 to some value and the number of values 360 , how can make a loop start from the first value of w to last value
for w=15*(ts-12)
H(w)=sind(w+1)-sind(w)
end
답변 (1개)
Azzi Abdelmalek
2016년 7월 15일
편집: Azzi Abdelmalek
2016년 7월 15일
w=linspace(some_value1,some_value2,360)
H=sind(w+1)-sind(w)
댓글 수: 2
Jose Louis
2016년 7월 15일
편집: Azzi Abdelmalek
2016년 7월 15일
Azzi Abdelmalek
2016년 7월 15일
편집: Azzi Abdelmalek
2016년 7월 15일
fi=19.9450; %is the latitude
GMT=2 ;% Time Zone for example +2
LT=5; % local time (LT).
lambda=50.067;% longitude
Zc=15*GMT;%Local Standard Time Meridian
for n=1:365 %the day of the year [a number 1 through 365]
B=(360/365)*(n-81)*pi/180;% in degrees and d is the number of days since the start of the year
E=9.87*sin(2*B)-7.53*cos(B)-1.5*sin(B); % (in minutes) is an empirical equation that corrects for the eccentricity of the Earth's orbit and the Earth's axial tilt.
tc=4*(lambda-Zc)+E;%Time Correction Factor
ts=LT+(tc/60);%Local Solar Time (LST) can be found by using the previous two corrections to adjust the local time (LT).
w(n)=15*(ts-12);%Hour Angle converts the local solar time (w) into the number of degrees which the sun moves across the sky
segma=23.45*sin((284+n)/36.25); %The solar declination
Gsc=1.367;%solar constant [1.367 kW/m2],
Gon=Gsc*(1+0.033*cos(360*n/365));
end
H=sind(w+1)-sind(w)
%B=diff(sind(1:365))
카테고리
도움말 센터 및 File Exchange에서 Earth and Planetary Science에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!