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?

 Réponse acceptée

Titus Edelhofer
Titus Edelhofer le 20 Avr 2012

0 votes

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

Plus de réponses (1)

yngv
yngv le 20 Avr 2012

0 votes

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,

Catégories

En savoir plus sur Line Plots dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by