Skip to content

Instantly share code, notes, and snippets.

@mattgaidica
Created November 26, 2018 01:17
Show Gist options
  • Save mattgaidica/d953b62d1057a48a813739cd2edfda61 to your computer and use it in GitHub Desktop.
Save mattgaidica/d953b62d1057a48a813739cd2edfda61 to your computer and use it in GitHub Desktop.
rows = 3;
cols = 4;
figure;
for iRow = 1:rows
    for iCol = 1:cols
        subplot(rows,cols,prc(cols,[iRow iCol]));
        title(['Subplot ',num2str(prc(cols,[iRow iCol]))],'fontSize',14);
        text(0.5,0.5,[num2str(iRow),', ',num2str(iCol)],...
            'HorizontalAlignment','center','fontsize',14);
    end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment