How to make correct axis?

1 次查看(过去 30 天)
J.
J. 2011-9-13
Im doing a plot using surfc(z(2:74,2:20)) (2:74 and 2:20 because the first row and first column is the x- and y-axis values), but.. my data is from a simulation where i used 5 steps between each simulation. So my x-axis goes from 0 to 90, but with only 19 values. Same problem with the y-axis - there i have 73 values, but going from -180 to 180.
How do i make matlab understand this, so that the values on the x- and y-axis isnt 0-20 and 0-80 ?
Thanks in advance - i hope there are some bright minds out there :)

回答(1 个)

Jan
Jan 2011-9-13
You have to define the X- and Y-values in the SURFC command to define the X- and Y-values in the plot. E.g.:
[X,Y,Z] = peaks(30);
figure
surfc(X,Y,Z)
figure
surfc(X + 10,Y,Z)
  1 个评论
J.
J. 2011-9-13
Not sure i fully understand how to do that exactly. Can you explain it further?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by