Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

coswm has a dimension of 1x1, while it needs to be 1x365. what am i doing wrong?

2 visualizaciones (últimos 30 días)
Iris Kiebert
Iris Kiebert el 15 de Dic. de 2019
Cerrada: Walter Roberson el 15 de Dic. de 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_days=n %azimuth angle
sinoaz=-23.45*(pi/180)*cos(((2*pi)/365)*(10+n));
oaz=asin(sinoaz);
%wm=(m+7200)*pi/7200;
%sin(a)=cos(o)*cos(wh)*cos(p)+sino*sin(p)
%sin(a)-sino*sin(p)=cos(o)*cos(wh)*cos(p)
%cos(wh)=(sin(a)-sino*sin(p))/((cos(o)*cos(p)))
coswm=(sind(az)-(sinoaz*sind(p)))/((cos(oaz)*cosd(p)));
wmaz=acos(coswm);
sinaaz=sind(az);
sinAz=(sind(wmaz)*cosd(oaz))/sinaaz;
Az=asind(sinAz);
end
  1 comentario
Walter Roberson
Walter Roberson el 15 de Dic. de 2019
Replaced by later https://www.mathworks.com/matlabcentral/answers/496696-coswm-should-have-a-1x365-dimension-but-its-dimension-is-1x1-what-am-i-doing-wrong which has an answer

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by