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?

 採用された回答

Titus Edelhofer
Titus Edelhofer 2012 年 4 月 20 日

0 投票

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

その他の回答 (1 件)

yngv
yngv 2012 年 4 月 20 日

0 投票

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,

カテゴリ

ヘルプ センター および File ExchangeLine Plots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by