Sorry I made a mistake when copying the code
long=linspace(0,360,288);
lat=linspace(0,180,180);
res=zeros(288,180);
for i=1:1.25:length(long)
for j=1:1:length(long)
res(i,j)=[long(i) lat(j)];
end
end
and I got this error
Subscripted assignment dimension mismatch.
Error in odayalbedo (line 12) res(i,j)=[long(i) lat(j)];
Thanks