Hi, I have an 860 by 122 matrix producing a plot below.
I want to interpolate over NaN columns but not all the NaNs in the matrix. I tried using interp function but it gives strange value that are unreasonably wrong. See my code below and attached mat file
figure(1)pcolor(Y1,Ydepth,sst_up_574); shading flatset(gca,'Ydir','reverse')set(gca,'xlim',[bin(1) bin(91)],... 'ylim',[0 500],'fontsize',8,'xminortick','on','yminortick','on') hold on hc = colorbar; rmap=jet(20); newmap=rmap(2:1:20,:); colormap(newmap); caxis([4 23]); grid on; box on set(gca,'Fontweight','bold','Fontsize',16); set(get(hc,'ylabel'),'string','Water Temperature (^oC)','rotation',270,'verticalalignment','bottom'); ylabel('Depth (m)'); xlabel('Date'); title(['Water Temperature: Upstream SG574'], 'fontweight', 'bold','FontSize',18)
Best Answer