Here is the code I'm trying to use to generate multiple .jpg images by looping.
for a=11:12:143 data1=data1(:,date1(a:a+11,:)); data2=data2(:,date2(a:a+11,:));
R = corr2(data1,data2); R_squared = R^2;
scatter(data1,data2) ylabel('CF (unitless)') xlabel('AOD') title('Cloud Fraction Vs Aerosol Optical Depth (Ocean only, -10 <= lat <= 7, 1 deg. Monthly Resolution)') text(4.5,1, ['R^2 = ' num2str(R_squared)]) axis([0 5 0 1]) grid on year = a+1990; print('-djpeg','-r300',sprintf('CF vs. AOD-%d.jpg',year)) end
But instead of 11 images like I'm supposed to get (if you divide distance/step size = (154-11)/11) I only get one, the loop isn't looping. Can anyone help me out here, tell me why??
No products are associated with this question.
Worked fine for me, so check this out: http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/