How to make correct axis?
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
Jan
on 13 Sep 2011
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)
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!