When you ask interp1 to interpolate outside the original range of x, then the default value returned is NaN.
You could try
AA = interp1(1:12, A, linspace(1,12,365));
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!