How to make correct axis?
1 次查看(过去 30 天)
显示 更早的评论
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 :)
0 个评论
回答(1 个)
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)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!