ax. xtick = xtick; in matlab

To assign the xtick property to itself in MATLAB you can simply use the following one-liner:

main.m
set(gca,'xtick', get(gca,'xtick'))
35 chars
2 lines

This will get the current xtick value of the current axes object gca and then set it back to the same property.

related categories

gistlibby LogSnag