Define your variables with linspace:
T=linspace(0,24,100);
omega=((12-T)/24)*360;
phi=linspace(-180,180,100);
alpha = linspace(0,90,100);
latitude=45;
delta=linspace(-23.5,23.5,100);
You'll get the same number of elements on each array. Your:
sind(alpha)=sind(delta).*sind(latitude)+cosd(delta).*cosd(latitude).*cos(omega);
cosd(phi)=(sind(alpha).*sind(latitude)-cosd(delta))./(cosd(alpha).*cosd(latitude));
are incongruently defined. What do you really want, alpha or sind(alpha)? why do you define alpha and phi as you did in
phi=linspace(-180,180,100);
alpha = linspace(0,90,100);
?
Do you want something like this?
alpha=sind(delta).*sind(latitude)+cosd(delta).*cosd(latitude).*cos(omega);
phi=(sind(alpha).*sind(latitude)-cosd(delta))./(cosd(alpha).*cosd(latitude));
plot(alpha,phi,'.')
Best Answer