%Christy Baker %GLG 410 Function for Scaled Image Plot %Date Created: November 20,2011 %Date modified December 9, 2011 %This plot will be used in the main script of the Japanscript.m %--------------------------------------------------------------- function myImage(step,x,y,z,xtitle,ytitle) Lon_range = min(x):step:max(x); Lat_range = min(y):step:max(y); for n = 1:length(Lon_range); for m = 1:length(Lat_range); tf = x >= Lon_range(n) - step./2 & x <= Lon_range(n) + step./2 & y >= Lat_range(m)- step./2 & y <= Lat_range(m) + step./2; locations = find(tf); z_avg(m,n) = mean(z(locations)); end end imagesc(Lon_range,Lat_range,z_avg) xlabel(xtitle) ylabel(ytitle) set(gca,'Ydir','normal') colorbar hold on