Assume I had a matrix of dimension nX20. I want to plot each column using a loop, but there is some problem in giving a title for each plot in a loop. I want to give the titles data1, data2 and so on for each plot. My loop looks like this:
surf(squeeze(X),squeeze(Y),reshape(data(:,k),size(squeeze(X))),'edgecolor','none')
set(gcf,'renderer','painters')