Effacer les filtres
Effacer les filtres

please help me figure out what to do

2 vues (au cours des 30 derniers jours)
Iris Kiebert
Iris Kiebert le 15 Déc 2019
Modifié(e) : per isakson le 16 Déc 2019
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
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));
x=lenthofshadow.*cos(Ashadow);
y=lenthofshadow.*sin(Ashadow);
figure
[X,Y]=meshgrid(1:11);
figure;
hold on;
plot(X,Y,'k');
plot(Y,X,'k');
x=lenthofshadow.*cos(Ashadow);
y=lenthofshadow.*sin(Ashadow);
axis off
while 15<ashadow||ashadow<90
n_loop=n_loop+1;
if (n_loop >= max_loops)
disp('exceeded max number of loops')
break
end
end
end
i want to calculate how much hours of shade each cell in a grid gets with the azimuth angle (Ashadow) and thelength of the shadow lengthofshadow to aid me in my calculations. But im stuck. please help me
  2 commentaires
Rik
Rik le 15 Déc 2019
Have a read here and here. It will greatly improve your chances of getting an answer.
Walter Roberson
Walter Roberson le 16 Déc 2019
What is the difference between this and your earlier https://www.mathworks.com/matlabcentral/answers/496772-my-figure-doesnt-isnt-right ?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by