Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
i should only count the shadow if ashadow>15, how do i do that? also the lengthofshadow only changes for the day number and not the minute of the day, how to solv this?
조회 수: 1 (최근 30일)
이전 댓글 표시
close all
clear all
h=[1:24];%hours in day
m=[1:14400];%minutes in day
n_param=5;
n=[1:365];%days in year
az=0.0001; % degrees %a=0,001 , because a is near zero during sunrise and sunset.
ndec=355; %21 december is de 335e dag van het jaar
njul=202; %21 juli is de 202e dag van het jaar
p=52.3667; %altitude amsterdam
heigthblock=25; %heigth of the block in mETER
sino=zeros(1,365);
max_loops = 100;
for N=n
[n,h]=meshgrid(n,h);
wh=(h+12)*(pi/12); %OPDRAcht 4
sinoaz=-23.45*(pi/180)*cos(((2*pi)/365)*(10+n));
oaz=asin(sinoaz);
sinashadow=cos(oaz).*cosd(wh).*cosd(p)+sinoaz.*sind(p);
ashadow=asin(sinashadow);
%sinAshadow=(sind(wh).*cos(oaz))/sinashadow;
%Ashadow=asind(sinAshadow);
%Tan(a)=overstaande/aanliggende=height block/lenth shadow
%lenth shadow=heigth block/Tan(a)
lenthofshadow=heigthblock./(tan(ashadow));
surf(n,h,lenthofshadow)
while 15<ashadow||ashadow
n_loop=n_loop+1;
if (n_loop >= max_loops)
disp('exceeded max number of loops')
break
end
end
end
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!