x = 0:9 ; y = 2+3.*x; figure; plot(x,y);
xt = get(gca, 'XTick ');
xtlc = sprintfc('%.1f', xt.^3 );
set(gca, 'XTick', xt, 'XTickLabel',xtlc)
This is your code. I added a " . " because it ia vector (y = 2+3.*x). Anyway.
When I run this code, thre is an error.
Next : of course I can take (0:9).^3 as you mentionned but this is not my question.
I realize that the formulation of my question is misleading because you could not understand clearly what I intend to do. So I am very sorry for that.
My question is related to the grid of the X-axis that I would like to be as cubic intervals on the graph (similarly as log scale). If I apply your method, I get a fixed interval on X-axis. Anyway. Thank you again for your time,