Azzera filtri
Azzera filtri

How to make correct axis?

2 visualizzazioni (ultimi 30 giorni)
J.
J. il 13 Set 2011
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 :)

Risposte (1)

Jan
Jan il 13 Set 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)
  1 Commento
J.
J. il 13 Set 2011
Not sure i fully understand how to do that exactly. Can you explain it further?

Accedi per commentare.

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by