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).

답변 (1개)

Asad (Mehrzad) Khoddam
Asad (Mehrzad) Khoddam 2020년 10월 9일

0 개 추천

댓글 수: 7

SZ N
SZ N 2020년 10월 9일
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 2020년 10월 9일
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 2020년 10월 9일
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 2020년 10월 10일
what matlab function do i use to get this contour lines that I have shown above?
a combination of meshgrid and contour

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Contour Plots에 대해 자세히 알아보기

태그

질문:

2020년 10월 9일

댓글:

2020년 10월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by