axis of mesh

4 views (last 30 days)
yngv
yngv on 20 Apr 2012
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?

Accepted Answer

Titus Edelhofer
Titus Edelhofer on 20 Apr 2012
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

More Answers (1)

yngv
yngv on 20 Apr 2012
The code looks like n=92; tid=[0:15:n*15-15]; Tempbar=zeros(n,296);
for i=1:n
name=sprintf('M1%u',i);
load(name);
temp=eval(name);
Tempbar(i,:)=temp(117,15:310)
end
figure
mesh(Tempbar);
I want to have my X axis to be [0 305] and y-axis to be [0 15*80] without changing the content of the plot,

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!