Topographic map with gradient vector

The fig shown below is an example for surface of apple with 224 points (14 x 16 with 5 mm spacing).
How do I get this figure with my own 100 points using Matlab to generate a plot of the surface using your measurements of z(x; y).

Réponses (1)

Asad (Mehrzad) Khoddam
Asad (Mehrzad) Khoddam le 9 Oct 2020

0 votes

7 commentaires

SZ N
SZ N le 9 Oct 2020
I referred this link before but I am not getting the right plot like the one i posted in the question above.
I used this equation/code to generate but I have no idea how to get the above graph.
The contour is for yhe given function. Do have 100 points as z? What is the range of x and y?
SZ N
SZ N le 9 Oct 2020
Yes, I have 120 points for the base=x and height=y.
x= 0.1- 1.5
y= 0.5 - 4.5
SZ N
SZ N le 9 Oct 2020
So I took an apple and cut into half from top to bottom. Then took one half an apple and cut into 12 slices with almost equal measurements (i.e, base and height) . Now with 120 data points I have to use Matlab to generate a plot of the surface using your measurements of z(x; y).
Instructions that was given:
The surface height is denoted by both the shaded regions and the contour
lines. These were plotted in Matlab using the surf and contour functions,
respectively. Note that to use these plotting tools, the Matlab function
meshgrid is used to generate matrices for the x- and y-dimensions. Note
that the shaded hue of surf can be adjusted using the `FaceAlpha' prop-
erty, and the standard grid lines applied may be removed (as shown) by
setting the `EdgeColor' property to `none'. Additionally, the line thick-
ness of the contour function may be adjusted by setting the `LineWidth'
property. Finally, the color bar shown on the right-hand-side of the gure
may enabled using the `colorbar' command.
what is the dimensions of a, y, and z?
SZ N
SZ N le 10 Oct 2020
what matlab function do i use to get this contour lines that I have shown above?
a combination of meshgrid and contour

Connectez-vous pour commenter.

Catégories

En savoir plus sur Contour Plots dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by