MATLAB: Axis of mesh

axisMATLABmeshplotting

Hello im trying to plot a m x n matrix with the mesh commando but I dont want the axis to be the matrix size, how can i change this and keep the current resolution?

Best Answer

Hi,
hard to guess what you want to do. I'll give it a try: you see on the axis the labels going from 1:m and 1:n? If you don't like this, you need to pass the values the correspond to this, e.g.
x = linspace(0, 1, 10);
y = linspace(0, 5, 7);
Z = rand(7, 10);
mesh(x,y,Z)
Titus